2015-12-27 02:48:10 +00:00
{{ define "base" }}
2015-12-27 03:35:09 +00:00
<!DOCTYPE html> < html > < head > < meta charset = "utf-8" > < title > Gophish API< / title > < link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" > < style > @ i m p o r t u r l ( ' h t t p s : / / f o n t s . g o o g l e a p i s . c o m / c s s ? f a m i l y = R o b o t o : 4 0 0 , 7 0 0 | I n c o n s o l a t a | R a l e w a y : 2 0 0 ' ) ; @ i m p o r t " / c s s / d o c s . c s s " ; . h l j s - c o m m e n t , . h l j s - t i t l e { c o l o r : # 8 e 9 0 8 c } . h l j s - v a r i a b l e , . h l j s - a t t r i b u t e , . h l j s - t a g , . h l j s - r e g e x p , . r u b y . h l j s - c o n s t a n t , . x m l . h l j s - t a g . h l j s - t i t l e , . x m l . h l j s - p i , . x m l . h l j s - d o c t y p e , . h t m l . h l j s - d o c t y p e , . c s s . h l j s - i d , . c s s . h l j s - c l a s s , . c s s . h l j s - p s e u d o { c o l o r : # c 8 2 8 2 9 } . h l j s - n u m b e r , . h l j s - p r e p r o c e s s o r , . h l j s - p r a g m a , . h l j s - b u i l t _ i n , . h l j s - l i t e r a l , . h l j s - p a r a m s , . h l j s - c o n s t a n t { c o l o r : # f 5 8 7 1 f } . r u b y . h l j s - c l a s s . h l j s - t i t l e , . c s s . h l j s - r u l e s . h l j s - a t t r i b u t e { c o l o r : # e a b 7 0 0 } . h l j s - s t r i n g , . h l j s - v a l u e , . h l j s - i n h e r i t a n c e , . h l j s - h e a d e r , . r u b y . h l j s - s y m b o l , . x m l . h l j s - c d a t a { c o l o r : # 7 1 8 c 0 0 } . c s s . h l j s - h e x c o l o r { c o l o r : # 3 e 9 9 9 f } . h l j s - f u n c t i o n , . p y t h o n . h l j s - d e c o r a t o r , . p y t h o n . h l j s - t i t l e , . r u b y . h l j s - f u n c t i o n . h l j s - t i t l e , . r u b y . h l j s - t i t l e . h l j s - k e y w o r d , . p e r l . h l j s - s u b , . j a v a s c r i p t . h l j s - t i t l e , . c o f f e e s c r i p t . h l j s - t i t l e { c o l o r : # 4 2 7 1 a e } . h l j s - k e y w o r d , . j a v a s c r i p t . h l j s - f u n c t i o n { c o l o r : # 8 9 5 9 a 8 } . h l j s { d i s p l a y : b l o c k ; b a c k g r o u n d : w h i t e ; c o l o r : # 4 d 4 d 4 c ; p a d d i n g : . 5 e m } . c o f f e e s c r i p t . j a v a s c r i p t , . j a v a s c r i p t . x m l , . t e x . h l j s - f o r m u l a , . x m l . j a v a s c r i p t , . x m l . v b s c r i p t , . x m l . c s s , . x m l . h l j s - c d a t a { o p a c i t y : . 5 } b o d y { c o l o r : b l a c k ; b a c k g r o u n d : w h i t e ; f o n t - f a m i l y : ' R o b o t o ' , H e l v e t i c a , s a n s - s e r i f ; f o n t - s i z e : 1 4 p x ; l i n e - h e i g h t : 1 . 4 2 } h e a d e r { b o r d e r - b o t t o m : 1 p x s o l i d # f 2 f 2 f 2 ; m a r g i n - b o t t o m : 1 2 p x } h 1 , h 2 , h 3 , h 4 , h 5 { c o l o r : b l a c k ; m a r g i n : 1 2 p x 0 } h 1 . p e r m a l i n k , h 2 . p e r m a l i n k , h 3 . p e r m a l i n k , h 4 . p e r m a l i n k , h 5 . p e r m a l i n k { m a r g i n - l e f t : 6 p x ; o p a c i t y : 0 ; t r a n s i t i o n : o p a c i t y . 2 5 s e a s e } h 1 : h o v e r . p e r m a l i n k , h 2 : h o v e r . p e r m a l i n k , h 3 : h o v e r . p e r m a l i n k , h 4 : h o v e r . p e r m a l i n k , h 5 : h o v e r . p e r m a l i n k { o p a c i t y : 1 } h 1 { f o n t - f a m i l y : ' R a l e w a y ' , H e l v e t i c a , s a n s - s e r i f ; f o n t - s i z e : 3 6 p x ; f o n t - w e i g h t : 5 0 0 } h 2 { f o n t - f a m i l y : ' R a l e w a y ' , H e l v e t i c a , s a n s - s e r i f ; f o n t - s i z e : 3 0 p x ; f o n t - w e i g h t : 5 0 0 } h 3 { f o n t - s i z e : 1 0 0 % ; t e x t - t r a n s f o r m : u p p e r c a s e } h 5 { f o n t - s i z e : 1 0 0 % ; f o n t - w e i g h t : n o r m a l } p { m a r g i n : 0 0 1 0 p x } p . c h o i c e s { l i n e - h e i g h t : 1 . 6 } a { c o l o r : # 4 2 8 b c a ; t e x t - d e c o r a t i o n : n o n e } l i p { m a r g i n : 0 } d l d t { f l o a t : l e f t ; w i d t h : 1 6 0 p x ; c l e a r : l e f t ; t e x t - a l i g n : r i g h t ; o v e r f l o w : h i d d e n ; t e x t - o v e r f l o w : e l l i p s i s ; w h i t e - s p a c e : n o w r a p ; f o n t - w e i g h t : 7 0 0 } d l d d { m a r g i n - l e f t : 1 8 0 p x } b l o c k q u o t e { c o l o r : r g b a ( 0 , 0 , 0 , 0 . 5 ) ; f o n t - s i z e : 1 5 . 5 p x ; p a d d i n g : 1 0 p x 2 0 p x ; m a r g i n : 1 2 p x 0 ; b o r d e r - l e f t : 5 p x s o l i d # e 8 e 8 e 8 } b l o c k q u o t e p : l a s t - c h i l d { m a r g i n - b o t t o m : 0 } p r e { b a c k g r o u n d - c o l o r : # f 5 f 5 f 5 ; p a d d i n g : 1 2 p x ; b o r d e r : 1 p x s o l i d # c f c f c f ; b o r d e r - r a d i u s : 6 p x ; o v e r f l o w : a u t o } p r e c o d e { b a c k g r o u n d - c o l o r : t r a n s p a r e n t ; p a d d i n g : 0 ; b o r d e r : n o n e } c o d e { c o l o r : # 4 4 4 ; b a c k g r o u n d - c o l o r : # f 5 f 5 f 5 ; f o n t - f a m i l y : ' I n c o n s o l a t a ' , m o n o s p a c e ; p a d d i n g : 1 p x 4 p x ; b o r d e r : 1 p x s o l i d # c f c f c f ; b o r d e r - r a d i u s : 3 p x } u l , o l { p a d d i n g - l e f t : 2 e m } t a b l e { b o r d e r - c o l l a p s e : c o l l a p s e ; b o r d e r - s p a c i n g : 0 ; m a r g i n - b o t t o m : 1 2 p x } t a b l e t r : n t h - c h i l d ( 2 n ) { b a c k g r o u n d - c o l o r : # f a f a f a } t a b l e t h , t a b l e t d { p a d d i n g : 6 p x 1 2 p x ; b o r d e r : 1 p x s o l i d # d 9 d 9 d 9 } . n o t e , . w a r n i n g { p a d d i n g : . 3 e m 1 e m ; m a r g i n : 1 e m 0 ; b o r d e r - r a d i u s : 2 p x ; f o n t - s i z e : 9 0 % } . n o t e h 1 , . w a r n i n g h 1 , . n o t e h 2 , . w a r n i n g h 2 , . n o t e h 3 , . w a r n i n g h 3 , . n o t e h 4 , . w a r n i n g h 4 , . n o t e h 5 , . w a r n i n g h 5 , . n o t e h 6 , . w a r n i n g h 6 { f o n t - f a m i l y : ' R a l e w a y ' , H e l v e t i c a , s a n s - s e r i f ; f o n t - s i z e : 1 3 5 % ; f o n t - w e i g h t : 5 0 0 } . n o t e p , . w a r n i n g p { m a r g i n : . 5 e m 0 } . n o t e { c o l o r : b l a c k ; b a c k g r o u n d - c o l o r : # f 0 f 6 f b ; b o r d e r - l e f t : 4 p x s o l i d # 4 2 8 b c a } . n o t e h 1 , . n o t e h 2 , . n o t e h 3 , . n o t e h 4 , . n o t e h 5 , . n o t e h 6 { c o l o r : # 4 2 8 b c a } . w a r n i n g { c o l o r : b l a c k ; b a c k g r o u n d - c o l o r : # f b f 1 f 0 ; b o r d e r - l e f t : 4 p x s o l i d # c 9 3 0 2 c } . w a r n i n g h 1 , . w a r n i n g h 2 , . w a r n i n g h 3 , . w a r n i n g h 4 , . w a r n i n g h 5 , . w a r n i n g h 6 { c o l o r : # c 9 3 0 2 c } n a v { p o s i t i o n : f i x e d ; t o p : 2 4 p x ; b o t t o m : 0 ; o v e r f l o w - y : a u t o } n a v . r e s o u r c e - g r o u p { p a d d i n g : 0 } n a v . r e s o u r c e - g r o u p . h e a d i n g { p o s i t i o n : r e l a t i v e } n a v . r e s o u r c e - g r o u p . h e a d i n g . c h e v r o n { p o s i t i o n : a b s o l u t e ; t o p : 1 2 p x ; r i g h t : 1 2 p x ; o p a c i t y : . 5 } n a v . r e s o u r c e - g r o u p . h e a d i n g a { d i s p l a y : b l o c k ; c o l o r : b l a c k ; o p a c i t y : . 7 ; b o r d e r - l e f t : 2 p x s o l i d t r a n s p a r e n t ; m a r g i n : 0 } n a v . r e s o u r c e - g r o u p . h e a d i n g a : h o v e r { b o r d e r - l e f t : 2 p x s o l i d b l a c k } n a v u l { l i s t - s t y l e - t y p e : n o n e ; p a d d i n g - l e f t : 0 } n a v u l a { d i s p l a y : b l o c k ; f o n t - s i z e : 1 3 p x ; c o l o r : r g b a ( 0 , 0 , 0 , 0 . 7 ) ; p a d d i n g : 8 p x 1 2 p x ; b o r d e r - t o p : 1 p x s o l i d # d 9 d 9 d 9 ; b o r d e r - l e f t : 2 p x s
2015-12-26 04:09:32 +00:00
< p > These docs describe how to use the < a href = "https://github.com/jordan-wright/gophish" > gophish< / a > API.< / p >
< div class = "note" >
< h2 id = "header-authorization" > Authorization < a class = "permalink" href = "#header-authorization" aria-hidden = "true" > ¶< / a > < / h2 >
< p > All API requests require the use of a generated API key. You can find your API key, or generate a new one, by navigating to the /settings endpoint, or clicking the “Settings” sidebar item.< / p >
< p > When making requests, simply append the < code > api_key=[API_KEY]< / code > as a GET parameter to authorize yourself to the API.< / p >
< pre > < code class = "language-http" > GET /api/campaigns/?api_key=12345678901234567890123456789012< / code > < / pre >
< p > If no API key is provided, you’ ll receive the following response when attempting to make requests to API endpoints:< / p >
< pre > < code class = "language-json" > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "API Key not set"< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > false< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > null< / span >
< / span > }< / code > < / pre >
< / div >
< section id = "campaigns" class = "resource-group" > < h2 class = "group-heading" > Campaigns< a href = "#campaigns" class = "permalink" > ¶ < / a > < / h2 > < p > Campaigns object contain the resources needed for gophish to launch and track a simulated phishing campaign.< / p >
< p > Campaigns have the following attributes:< / p >
< ul >
< li >
< p > < code > id< / code > : 1 (required, number) - Unique identifier< / p >
< / li >
< li >
< p > < code > name< / code > : Example Campaign (required) - Title of Campaign< / p >
< / li >
< li >
< p > < code > created_date< / code > : 2015-1-1T01:02:03.000000Z (datetime) - Date the Campaign was created< / p >
< / li >
< li >
< p > < code > completed_date< / code > : 2015-1-1T01:02:03.000000Z (datetime) - Date the Campaign was completed< / p >
< / li >
< li >
2015-12-27 02:48:10 +00:00
< p > < code > template< / code > : < a href = "#templates" > Template< / a > < / p >
2015-12-26 04:09:32 +00:00
< / li >
< li >
2015-12-27 02:48:10 +00:00
< p > < code > page< / code > : < a href = "#pages" > Page< / a > (required) - Landing page for users who click the phishing link< / p >
2015-12-26 04:09:32 +00:00
< / li >
< li >
< p > < code > status< / code > : Emails Sent (required, string) - The current status of the campaign< / p >
< / li >
< li >
< p > < code > results< / code > : Attributes (ResultsList)< / p >
< / li >
< li >
< p > < code > timeline< / code > : Attributes (EventList)< / p >
< / li >
< li >
< p > < code > smtp< / code > : Attributes (SMTP)< / p >
< / li >
< li >
< p > < code > url< / code > : < a href = "http://foo.bar" > http://foo.bar< / a > (required, string) - The URL used in the Template sent to us
ers< / p >
< / li >
< / ul >
< div id = "campaigns-campaigns" class = "resource" > < h3 class = "resource-heading" > Campaigns< a href = "#campaigns-campaigns" class = "permalink" > ¶ < / a > < / h3 > < div id = "campaigns-campaigns-get" class = "action get" > < h4 class = "action-heading" > < div class = "name" > Get Campaigns< / div > < a href = "#campaigns-campaigns-get" class = "method get" > GET< / a > < code class = "uri" > /campaigns< / code > < / h4 > < p > Get a list of campaigns.< / p >
< div class = "title" > < strong > Response < code > 200< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > [
{
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Campaign"< / span > < / span > ,
"< span class = "hljs-attribute" > created_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span > < / span > ,
"< span class = "hljs-attribute" > completed_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span > < / span > ,
"< span class = "hljs-attribute" > template< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Template"< / span > < / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example email template subject"< / span > < / span > ,
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "This is a test message!"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > attachments< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > page< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Page"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > status< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Emails Sent"< / span > < / span > ,
"< span class = "hljs-attribute" > results< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > timeline< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > smtp< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > url< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://foo.bar"< / span >
< / span > }
]< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span > < / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < div id = "campaigns-campaigns-post" class = "action post" > < h4 class = "action-heading" > < div class = "name" > Create New Campaign< / div > < a href = "#campaigns-campaigns-post" class = "method post" > POST< / a > < code class = "uri" > /campaigns< / code > < / h4 > < p > Create a new campaign< / p >
< div class = "title" > < strong > Request< / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Campaign"< / span > < / span > ,
"< span class = "hljs-attribute" > created_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span > < / span > ,
"< span class = "hljs-attribute" > completed_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span > < / span > ,
"< span class = "hljs-attribute" > template< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Template"< / span > < / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example email template subject"< / span > < / span > ,
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "This is a test message!"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > attachments< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > page< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Page"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > status< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Emails Sent"< / span > < / span > ,
"< span class = "hljs-attribute" > results< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > timeline< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > smtp< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > url< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://foo.bar"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Title of Campaign"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > created_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Campaign was created"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > completed_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Campaign was completed"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > template< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Subject of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Raw text of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "HTML of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > attachments< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The attachments sent with the email template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Template was last modified"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span >
]
< / span > }< / span > ,
"< span class = "hljs-attribute" > page< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of Page"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "HTML of the landing page users hit when clicking links in the email template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Page was last modified"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span > ,
< span class = "hljs-string" > "html"< / span >
]
< / span > }< / span > ,
"< span class = "hljs-attribute" > status< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The current status of the campaign"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > results< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > timeline< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > smtp< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span >
]
< / span > }< / span > ,
"< span class = "hljs-attribute" > url< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The URL used in the Template sent to users"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span > ,
< span class = "hljs-string" > "status"< / span > ,
< span class = "hljs-string" > "url"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 201< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Campaign"< / span > < / span > ,
"< span class = "hljs-attribute" > created_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span > < / span > ,
"< span class = "hljs-attribute" > completed_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span > < / span > ,
"< span class = "hljs-attribute" > template< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Template"< / span > < / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example email template subject"< / span > < / span > ,
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "This is a test message!"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > attachments< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > page< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Page"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > status< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Emails Sent"< / span > < / span > ,
"< span class = "hljs-attribute" > results< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > timeline< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > smtp< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > url< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://foo.bar"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Title of Campaign"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > created_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Campaign was created"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > completed_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Campaign was completed"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > template< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Subject of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Raw text of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "HTML of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > attachments< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The attachments sent with the email template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Template was last modified"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span >
]
< / span > }< / span > ,
"< span class = "hljs-attribute" > page< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of Page"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "HTML of the landing page users hit when clicking links in the email template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Page was last modified"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span > ,
< span class = "hljs-string" > "html"< / span >
]
< / span > }< / span > ,
"< span class = "hljs-attribute" > status< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The current status of the campaign"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > results< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > timeline< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > smtp< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span >
]
< / span > }< / span > ,
"< span class = "hljs-attribute" > url< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The URL used in the Template sent to users"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span > ,
< span class = "hljs-string" > "status"< / span > ,
< span class = "hljs-string" > "url"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 400< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "\"Error message\""< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "false"< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Any associated data"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The detailed error message"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The success status of the request"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < / div > < div id = "campaigns-campaign" class = "resource" > < h3 class = "resource-heading" > Campaign< a href = "#campaigns-campaign" class = "permalink" > ¶ < / a > < / h3 > < div id = "campaigns-campaign-get" class = "action get" > < h4 class = "action-heading" > < div class = "name" > Get Campaign< / div > < a href = "#campaigns-campaign-get" class = "method get" > GET< / a > < code class = "uri" > /campaigns/{id}< / code > < / h4 > < p > Get a campaign by its ID.< / p >
< div class = "title" > < strong > Parameters< / strong > < div class = "collapse-button show" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < dl class = "inner" > < dt > id< / dt > < dd > < code > number< / code > < span class = "required" > (required)< / span > < span class = "text-muted example" > < strong > Example: < / strong > < span > 1< / span > < / span > < p > The Campaign ID< / p >
< / dd > < / dl > < / div > < div class = "title" > < strong > Response < code > 200< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Campaign"< / span > < / span > ,
"< span class = "hljs-attribute" > created_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span > < / span > ,
"< span class = "hljs-attribute" > completed_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span > < / span > ,
"< span class = "hljs-attribute" > template< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Template"< / span > < / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example email template subject"< / span > < / span > ,
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "This is a test message!"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > attachments< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > page< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Page"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > status< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Emails Sent"< / span > < / span > ,
"< span class = "hljs-attribute" > results< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > timeline< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > smtp< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > url< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://foo.bar"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Title of Campaign"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > created_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Campaign was created"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > completed_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Campaign was completed"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > template< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Subject of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Raw text of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "HTML of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > attachments< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The attachments sent with the email template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Template was last modified"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span >
]
< / span > }< / span > ,
"< span class = "hljs-attribute" > page< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of Page"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "HTML of the landing page users hit when clicking links in the email template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Page was last modified"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span > ,
< span class = "hljs-string" > "html"< / span >
]
< / span > }< / span > ,
"< span class = "hljs-attribute" > status< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The current status of the campaign"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > results< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > timeline< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > smtp< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span >
]
< / span > }< / span > ,
"< span class = "hljs-attribute" > url< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The URL used in the Template sent to users"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span > ,
< span class = "hljs-string" > "status"< / span > ,
< span class = "hljs-string" > "url"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 404< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Campaign not found"< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > false< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > null< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < div id = "campaigns-campaign-delete" class = "action delete" > < h4 class = "action-heading" > < div class = "name" > Delete a Campaign< / div > < a href = "#campaigns-campaign-delete" class = "method delete" > DELETE< / a > < code class = "uri" > /campaigns/{id}< / code > < / h4 > < p > Delete a campaign by its ID.< / p >
< div class = "title" > < strong > Parameters< / strong > < div class = "collapse-button show" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < dl class = "inner" > < dt > id< / dt > < dd > < code > number< / code > < span class = "required" > (required)< / span > < span class = "text-muted example" > < strong > Example: < / strong > < span > 1< / span > < / span > < p > The Campaign ID< / p >
< / dd > < / dl > < / div > < div class = "title" > < strong > Response < code > 200< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
2015-12-27 02:48:10 +00:00
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Page deleted successfully!"< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > true< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > null< / span >
2015-12-26 04:09:32 +00:00
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 404< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Campaign not found"< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > false< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > null< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < / div > < / section > < section id = "templates" class = "resource-group" > < h2 class = "group-heading" > Templates< a href = "#templates" class = "permalink" > ¶ < / a > < / h2 > < p > Templates define what email content is sent to targets during campaigns. It contains the subject of the email as well as the HTML and text content of the email.< / p >
< ul >
< li >
< p > < code > id< / code > : 1 (required, number) - Unique identifier< / p >
< / li >
< li >
< p > < code > name< / code > : Example Template (required) - Name of template< / p >
< / li >
< li >
< p > < code > subject< / code > : Example email template subject - Subject of email sent to users< / p >
< / li >
< li >
< p > < code > text< / code > : < code > This is a test message!< / code > - Raw text of email sent to users< / p >
< / li >
< li >
< p > < code > html< / code > : < code > < html> < head> < /head> < body> This is a test message!< /body> < /html> < / code > - HTML of email sent to users< / p >
< / li >
< li >
< p > < code > attachments< / code > : Attributes (AttachmentList) - The attachments sent with the email template< / p >
< / li >
< li >
< p > < code > modified_date< / code > : < code > 2015-01-01T01:02:03.000000Z< / code > (string) - Date the Template was last modified< / p >
< / li >
< / ul >
< p > You can also attach files or payloads to the emails that you send. These are attached as a list of Attachment objects.< / p >
< p > Attachments have the following attributes:< / p >
< ul >
< li >
< p > < code > id< / code > : 1 (required, number) - Unique identifier< / p >
< / li >
< li >
< p > < code > name< / code > : Example Attachment (required) - Filename of Attachment< / p >
< / li >
< li >
< p > < code > content< / code > : Base64 encoded attachment content< / p >
< / li >
< li >
< p > < code > type< / code > : < code > text/plain< / code > - MIME type of the Attachment< / p >
< / li >
< / ul >
< div id = "templates-templates" class = "resource" > < h3 class = "resource-heading" > Templates< a href = "#templates-templates" class = "permalink" > ¶ < / a > < / h3 > < div id = "templates-templates-get" class = "action get" > < h4 class = "action-heading" > < div class = "name" > Get Templates< / div > < a href = "#templates-templates-get" class = "method get" > GET< / a > < code class = "uri" > /templates< / code > < / h4 > < p > Get a list of templates.< / p >
< div class = "title" > < strong > Response < code > 200< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > [
{
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Template"< / span > < / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example email template subject"< / span > < / span > ,
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "This is a test message!"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > attachments< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }
]< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span > < / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < div id = "templates-templates-post" class = "action post" > < h4 class = "action-heading" > < div class = "name" > Create New Template< / div > < a href = "#templates-templates-post" class = "method post" > POST< / a > < code class = "uri" > /templates< / code > < / h4 > < p > Create a new template< / p >
2015-12-27 02:48:10 +00:00
< div class = "note" >
< h2 id = "header-importing-an-existing-email" > Importing an Existing Email < a class = "permalink" href = "#header-importing-an-existing-email" aria-hidden = "true" > ¶< / a > < / h2 >
< p > What better way to make pixel-perfect emails than by importing an existing email you already have sitting in your inbox?< / p >
< p > Using the < a href = "#import-email" > Import Email< / a > endpoint, you can take a raw email and import it as a template into gophish.< / p >
< / div >
2015-12-26 04:09:32 +00:00
< div class = "title" > < strong > Request< / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Template"< / span > < / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example email template subject"< / span > < / span > ,
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "This is a test message!"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > attachments< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Subject of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Raw text of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "HTML of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > attachments< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The attachments sent with the email template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Template was last modified"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 201< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Template"< / span > < / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example email template subject"< / span > < / span > ,
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "This is a test message!"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > attachments< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Subject of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Raw text of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "HTML of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > attachments< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The attachments sent with the email template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Template was last modified"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 400< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "\"Error message\""< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "false"< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Any associated data"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The detailed error message"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The success status of the request"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < / div > < div id = "templates-template" class = "resource" > < h3 class = "resource-heading" > Template< a href = "#templates-template" class = "permalink" > ¶ < / a > < / h3 > < div id = "templates-template-get" class = "action get" > < h4 class = "action-heading" > < div class = "name" > Get Template< / div > < a href = "#templates-template-get" class = "method get" > GET< / a > < code class = "uri" > /templates/{id}< / code > < / h4 > < p > Get a template by its ID.< / p >
< div class = "title" > < strong > Parameters< / strong > < div class = "collapse-button show" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < dl class = "inner" > < dt > id< / dt > < dd > < code > number< / code > < span class = "required" > (required)< / span > < span class = "text-muted example" > < strong > Example: < / strong > < span > 1< / span > < / span > < p > The Template ID< / p >
< / dd > < / dl > < / div > < div class = "title" > < strong > Response < code > 200< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Template"< / span > < / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example email template subject"< / span > < / span > ,
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "This is a test message!"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > attachments< / span > ": < span class = "hljs-value" > []< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Subject of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Raw text of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "HTML of email sent to users"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > attachments< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The attachments sent with the email template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Template was last modified"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 404< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Template not found"< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > false< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > null< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < div id = "templates-template-delete" class = "action delete" > < h4 class = "action-heading" > < div class = "name" > Delete a Template< / div > < a href = "#templates-template-delete" class = "method delete" > DELETE< / a > < code class = "uri" > /templates/{id}< / code > < / h4 > < p > Delete a template by its ID.< / p >
< div class = "title" > < strong > Parameters< / strong > < div class = "collapse-button show" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < dl class = "inner" > < dt > id< / dt > < dd > < code > number< / code > < span class = "required" > (required)< / span > < span class = "text-muted example" > < strong > Example: < / strong > < span > 1< / span > < / span > < p > The Template ID< / p >
< / dd > < / dl > < / div > < div class = "title" > < strong > Response < code > 200< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
2015-12-27 02:48:10 +00:00
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Template deleted successfully!"< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > true< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > null< / span >
2015-12-26 04:09:32 +00:00
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 404< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Template not found"< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > false< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > null< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < / div > < / section > < section id = "groups" class = "resource-group" > < h2 class = "group-heading" > Groups< a href = "#groups" class = "permalink" > ¶ < / a > < / h2 > < p > Groups contain the details for one or more users targeted in the simulated phishing campaign. Groups contain the following attributes:< / p >
< ul >
< li >
< p > < code > id< / code > : 1 (required, number) - Unique identifier< / p >
< / li >
< li >
< p > < code > name< / code > : Example Group (required) - Name of the Group< / p >
< / li >
< li >
< p > < code > modified_date< / code > : < code > 2015-01-01T01:02:03.000000Z< / code > (string) - Date the Group was last modified< / p >
< / li >
< li >
< p > < code > targets< / code > : Attributes (TargetList) (required) - The targets in the group< / p >
< / li >
< / ul >
< p > Each target contains the following attributes:< / p >
< ul >
< li >
< p > < code > id< / code > : 1 (required, number) - Unique identifier< / p >
< / li >
< li >
< p > < code > first_name< / code > : John - First name of Target< / p >
< / li >
< li >
< p > < code > last_name< / code > : Doe - Last name of Target< / p >
< / li >
< li >
< p > < code > email< / code > : < a href = "mailto:john.doe@example.com" > john.doe@example.com< / a > - Email address of Target< / p >
< / li >
< li >
< p > < code > position< / code > : System Administrator - Company position of the Target< / p >
< / li >
< / ul >
2015-12-27 02:48:10 +00:00
< div class = "note" >
< h2 id = "header-have-a-lot-of-users-to-import?" > Have A Lot of Users to Import? < a class = "permalink" href = "#header-have-a-lot-of-users-to-import?" aria-hidden = "true" > ¶< / a > < / h2 >
< p > If you have all your targets in a CSV file, you can bulk import them into a group using the < a href = "#import-group" > Import CSV< / a > endpoint.< / p >
< p > In the future, we plan to add other importation methods to make setting up groups a breeze.< / p >
< / div >
2015-12-26 04:09:32 +00:00
< div id = "groups-groups" class = "resource" > < h3 class = "resource-heading" > Groups< a href = "#groups-groups" class = "permalink" > ¶ < / a > < / h3 > < div id = "groups-groups-get" class = "action get" > < h4 class = "action-heading" > < div class = "name" > Get Groups< / div > < a href = "#groups-groups-get" class = "method get" > GET< / a > < code class = "uri" > /groups< / code > < / h4 > < p > Get a list of groups.< / p >
< div class = "title" > < strong > Response < code > 200< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > [
{
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Group"< / span > < / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span > < / span > ,
"< span class = "hljs-attribute" > targets< / span > ": < span class = "hljs-value" > []
< / span > }
]< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span > < / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < div id = "groups-groups-post" class = "action post" > < h4 class = "action-heading" > < div class = "name" > Create New Group< / div > < a href = "#groups-groups-post" class = "method post" > POST< / a > < code class = "uri" > /groups< / code > < / h4 > < p > Create a new group< / p >
< div class = "title" > < strong > Request< / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Group"< / span > < / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span > < / span > ,
"< span class = "hljs-attribute" > targets< / span > ": < span class = "hljs-value" > []
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of the Group"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Group was last modified"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > targets< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 201< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Group"< / span > < / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span > < / span > ,
"< span class = "hljs-attribute" > targets< / span > ": < span class = "hljs-value" > []
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of the Group"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Group was last modified"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > targets< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 400< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "\"Error message\""< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "false"< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Any associated data"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The detailed error message"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The success status of the request"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < / div > < div id = "groups-group" class = "resource" > < h3 class = "resource-heading" > Group< a href = "#groups-group" class = "permalink" > ¶ < / a > < / h3 > < div id = "groups-group-get" class = "action get" > < h4 class = "action-heading" > < div class = "name" > Get Group< / div > < a href = "#groups-group-get" class = "method get" > GET< / a > < code class = "uri" > /groups/{id}< / code > < / h4 > < p > Get a group by its ID.< / p >
< div class = "title" > < strong > Parameters< / strong > < div class = "collapse-button show" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < dl class = "inner" > < dt > id< / dt > < dd > < code > number< / code > < span class = "required" > (required)< / span > < span class = "text-muted example" > < strong > Example: < / strong > < span > 1< / span > < / span > < p > The Group ID< / p >
< / dd > < / dl > < / div > < div class = "title" > < strong > Response < code > 200< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Group"< / span > < / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span > < / span > ,
"< span class = "hljs-attribute" > targets< / span > ": < span class = "hljs-value" > []
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of the Group"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Group was last modified"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > targets< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 404< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Group not found"< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > false< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > null< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < div id = "groups-group-delete" class = "action delete" > < h4 class = "action-heading" > < div class = "name" > Delete a Group< / div > < a href = "#groups-group-delete" class = "method delete" > DELETE< / a > < code class = "uri" > /groups/{id}< / code > < / h4 > < p > Delete a Group by its ID.< / p >
< div class = "title" > < strong > Parameters< / strong > < div class = "collapse-button show" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < dl class = "inner" > < dt > id< / dt > < dd > < code > number< / code > < span class = "required" > (required)< / span > < span class = "text-muted example" > < strong > Example: < / strong > < span > 1< / span > < / span > < p > The Template ID< / p >
< / dd > < / dl > < / div > < div class = "title" > < strong > Response < code > 200< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
2015-12-27 02:48:10 +00:00
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Group deleted successfully!"< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > true< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > null< / span >
2015-12-26 04:09:32 +00:00
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 404< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Group not found"< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > false< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > null< / span >
2015-12-27 02:48:10 +00:00
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < / div > < / section > < section id = "pages" class = "resource-group" > < h2 class = "group-heading" > Pages< a href = "#pages" class = "permalink" > ¶ < / a > < / h2 > < p > Pages are the HTML page that a user lands on after clicking on a phishing link.< / p >
2015-12-26 04:09:32 +00:00
< ul >
< li >
< p > < code > id< / code > : 1 (required, number) - Unique identifier< / p >
< / li >
< li >
< p > < code > name< / code > : Example Page (required, string) - Name of Page< / p >
< / li >
< li >
< p > < code > html< / code > : < code > < html> < head> < /head> < body> This is a test message!< /body> < /html> < / code > (required, string) - HTML of the landing page users hit when clicking links in the email template< / p >
< / li >
< li >
< p > < code > modified_date< / code > : < code > 2015-01-01T01:02:03.000000Z< / code > (string) - Date the Page was last modified< / p >
< / li >
< / ul >
2015-12-27 02:48:10 +00:00
< div class = "note" >
< h2 id = "header-importing-a-site" > Importing a Site < a class = "permalink" href = "#header-importing-a-site" aria-hidden = "true" > ¶< / a > < / h2 >
< p > Let gophish do the hard work for you in importing a site. By using the < a href = "#import-site" > Import Site< / a > endpoint, you can simply give gophish a URL and have the site imported for you.< / p >
< / div >
< div id = "pages-pages" class = "resource" > < h3 class = "resource-heading" > Pages< a href = "#pages-pages" class = "permalink" > ¶ < / a > < / h3 > < div id = "pages-pages-get" class = "action get" > < h4 class = "action-heading" > < div class = "name" > Get Pages< / div > < a href = "#pages-pages-get" class = "method get" > GET< / a > < code class = "uri" > /pages< / code > < / h4 > < p > Get a list of pages.< / p >
2015-12-26 04:09:32 +00:00
< div class = "title" > < strong > Response < code > 200< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > [
{
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Page"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }
]< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span > < / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < div id = "pages-pages-post" class = "action post" > < h4 class = "action-heading" > < div class = "name" > Create New Page< / div > < a href = "#pages-pages-post" class = "method post" > POST< / a > < code class = "uri" > /pages< / code > < / h4 > < p > Create a new page< / p >
< div class = "title" > < strong > Request< / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Page"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of Page"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "HTML of the landing page users hit when clicking links in the email template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Page was last modified"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span > ,
< span class = "hljs-string" > "html"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 201< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Page"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of Page"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "HTML of the landing page users hit when clicking links in the email template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Page was last modified"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span > ,
< span class = "hljs-string" > "html"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 400< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "\"Error message\""< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "false"< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Any associated data"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The detailed error message"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The success status of the request"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < / div > < div id = "pages-page" class = "resource" > < h3 class = "resource-heading" > Page< a href = "#pages-page" class = "permalink" > ¶ < / a > < / h3 > < div id = "pages-page-get" class = "action get" > < h4 class = "action-heading" > < div class = "name" > Get Page< / div > < a href = "#pages-page-get" class = "method get" > GET< / a > < code class = "uri" > /pages/{id}< / code > < / h4 > < p > Get a page by its ID.< / p >
< div class = "title" > < strong > Parameters< / strong > < div class = "collapse-button show" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < dl class = "inner" > < dt > id< / dt > < dd > < code > number< / code > < span class = "required" > (required)< / span > < span class = "text-muted example" > < strong > Example: < / strong > < span > 1< / span > < / span > < p > The Page ID< / p >
< / dd > < / dl > < / div > < div class = "title" > < strong > Response < code > 200< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Page"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of Page"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "HTML of the landing page users hit when clicking links in the email template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Page was last modified"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span > ,
< span class = "hljs-string" > "html"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 404< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Page not found"< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > false< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > null< / span >
2015-12-26 04:42:59 +00:00
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < div id = "pages-page-put" class = "action put" > < h4 class = "action-heading" > < div class = "name" > Put Page< / div > < a href = "#pages-page-put" class = "method put" > PUT< / a > < code class = "uri" > /pages< / code > < / h4 > < p > Modify a page by its ID.< / p >
< div class = "title" > < strong > Request< / strong > < / div > < div class = "title" > < strong > Response < code > 200< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
2015-12-26 04:09:32 +00:00
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Example Page"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "< html> < head> < /head> < body> This is a test message!< /body> < /html> "< / span > < / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "2015-01-01T01:02:03.000000Z"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "number"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Unique identifier"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > name< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Name of Page"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "HTML of the landing page users hit when clicking links in the email template"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > modified_date< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Date the Page was last modified"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "id"< / span > ,
< span class = "hljs-string" > "name"< / span > ,
< span class = "hljs-string" > "html"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 404< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
2015-12-27 02:48:10 +00:00
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Page not found"< / span > < / span > ,
2015-12-26 04:09:32 +00:00
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > false< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > null< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < div id = "pages-page-delete" class = "action delete" > < h4 class = "action-heading" > < div class = "name" > Delete a Page< / div > < a href = "#pages-page-delete" class = "method delete" > DELETE< / a > < code class = "uri" > /pages/{id}< / code > < / h4 > < p > Delete a page by its ID.< / p >
< div class = "title" > < strong > Parameters< / strong > < div class = "collapse-button show" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < dl class = "inner" > < dt > id< / dt > < dd > < code > number< / code > < span class = "required" > (required)< / span > < span class = "text-muted example" > < strong > Example: < / strong > < span > 1< / span > < / span > < p > The Page ID< / p >
< / dd > < / dl > < / div > < div class = "title" > < strong > Response < code > 200< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
2015-12-27 02:48:10 +00:00
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Page deleted successfully!"< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > true< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > null< / span >
2015-12-26 04:09:32 +00:00
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 404< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
2015-12-27 02:48:10 +00:00
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Page not found"< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > false< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-literal" > null< / span >
2015-12-26 04:09:32 +00:00
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < / div > < / section > < section id = "import" class = "resource-group" > < h2 class = "group-heading" > Import< a href = "#import" class = "permalink" > ¶ < / a > < / h2 > < p > Import functions facilitate the ability to import emails, groups and more using simple interfaces.< / p >
< div id = "import-group" class = "resource" > < h3 class = "resource-heading" > Group< a href = "#import-group" class = "permalink" > ¶ < / a > < / h3 > < div id = "import-group-post" class = "action post" > < h4 class = "action-heading" > < div class = "name" > Import a Group< / div > < a href = "#import-group-post" class = "method post" > POST< / a > < code class = "uri" > /import/group< / code > < / h4 > < p > This endpoint allows you to import a group from a CSV.< / p >
< p > The fields expected in the CSV are as follows:< / p >
< ul >
< li >
2015-12-26 04:42:59 +00:00
< p > First Name< / p >
< / li >
< li >
< p > Last Name< / p >
< / li >
< li >
< p > Position< / p >
2015-12-26 04:09:32 +00:00
< / li >
< li >
2015-12-26 04:42:59 +00:00
< p > Email< / p >
< / li >
< li >
< p > Company< / p >
2015-12-26 04:09:32 +00:00
< / li >
< / ul >
2015-12-26 04:42:59 +00:00
< div class = "title" > < strong > Request< / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > multipart/form-data; boundary=----BOUNDARY< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > ------BOUNDARY
Content-Disposition: form-data; name=< span class = "hljs-string" > "files[]"< / span > ; filename=< span class = "hljs-string" > "filename.csv"< / span >
Content-Type: application/vnd.ms-excel
[File Content]
------BOUNDARY< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 201< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > [
{
"< span class = "hljs-attribute" > id< / span > ": < span class = "hljs-value" > < span class = "hljs-number" > 1< / span > < / span > ,
"< span class = "hljs-attribute" > first_name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "John"< / span > < / span > ,
"< span class = "hljs-attribute" > last_name< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Doe"< / span > < / span > ,
"< span class = "hljs-attribute" > email< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "john.doe@example.com"< / span > < / span > ,
"< span class = "hljs-attribute" > position< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "System Administrator"< / span >
< / span > }
]< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "array"< / span > < / span > ,
2015-12-26 04:09:32 +00:00
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 400< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "\"Error message\""< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "false"< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Any associated data"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The detailed error message"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The success status of the request"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < / div > < div id = "import-email" class = "resource" > < h3 class = "resource-heading" > Email< a href = "#import-email" class = "permalink" > ¶ < / a > < / h3 > < div id = "import-email-post" class = "action post" > < h4 class = "action-heading" > < div class = "name" > Import an Email< / div > < a href = "#import-email-post" class = "method post" > POST< / a > < code class = "uri" > /import/email< / code > < / h4 > < p > This endpoint allows you to parse and import an email in RFC 5322 format.< / p >
< p > You can use this endpoint to easily import an email that you have received legitimately to re-use it for simulated phishing.< / p >
< div class = "title" > < strong > Request< / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > text/plain< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > MIME-Version: 1.0
Date: Fri, 25 Dec 2015 21:22:28 -0600
Subject: Foo Bar
From: John Doe < span class = "hljs-tag" > < < span class = "hljs-title" > john.doe@example.com< / span > > < / span >
To: Jane Doe < span class = "hljs-tag" > < < span class = "hljs-title" > jane.doe@example.com< / span > > < / span >
Content-Type: multipart/alternative; boundary=14dae9473639dc6b2a0527c4945f
--14dae9473639dc6b2a0527c4945f
Content-Type: text/plain; charset=UTF-8
Foo bar
--14dae9473639dc6b2a0527c4945f
Content-Type: text/html; charset=UTF-8
< span class = "hljs-tag" > < < span class = "hljs-title" > div< / span > < span class = "hljs-attribute" > dir< / span > =< span class = "hljs-value" > "ltr"< / span > > < / span > Foo bar< span class = "hljs-tag" > < /< span class = "hljs-title" > div< / span > > < / span >
--14dae9473639dc6b2a0527c4945f--< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 201< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Foo bar"< / span > < / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "\"\\u003cdiv\\u003eFoo bar\\u003c/div\\u003e\""< / span > < / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Foo Bar"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > text< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The email text part"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The email HTML part"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > subject< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The email subject"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 400< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "\"Error message\""< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "false"< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Any associated data"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The detailed error message"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The success status of the request"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < / div > < div id = "import-site" class = "resource" > < h3 class = "resource-heading" > Site< a href = "#import-site" class = "permalink" > ¶ < / a > < / h3 > < div id = "import-site-post" class = "action post" > < h4 class = "action-heading" > < div class = "name" > Import a Site< / div > < a href = "#import-site-post" class = "method post" > POST< / a > < code class = "uri" > /import/site< / code > < / h4 > < p > Imports a site via the URL. This causes gophish to reach out to the site and pull down the HTML of the URL given.< / p >
< p > To keep styles, images, and Javascript setup and working, gophish adds a < code > base< / code > tag to the returned HTML pointing to the original site.< / p >
< div class = "title" > < strong > Request< / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > url< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://foo.bar"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > url< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The URL to be retrieved"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "url"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 201< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"html": "< span class = "hljs-tag" > < < span class = "hljs-title" > html< / span > > < / span > < span class = "hljs-tag" > < < span class = "hljs-title" > head< / span > > < / span > < span class = "hljs-tag" > < /< span class = "hljs-title" > head< / span > > < / span > < span class = "hljs-tag" > < < span class = "hljs-title" > body< / span > > < / span > This is a test message!< span class = "hljs-tag" > < /< span class = "hljs-title" > body< / span > > < / span > < span class = "hljs-tag" > < /< span class = "hljs-title" > html< / span > > < / span > "
}< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > html< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "HTML of the requested URL."< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > required< / span > ": < span class = "hljs-value" > [
< span class = "hljs-string" > "html"< / span >
]< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < div class = "title" > < strong > Response < code > 400< / code > < / strong > < div class = "collapse-button" > < span class = "close" > Hide< / span > < span class = "open" > Show< / span > < / div > < / div > < div class = "collapse-content" > < div class = "inner" > < h5 > Headers< / h5 > < pre > < code > < span class = "hljs-attribute" > Content-Type< / span > : < span class = "hljs-string" > application/json< / span > < / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Body< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "\"Error message\""< / span > < / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "false"< / span > < / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "Any associated data"< / span >
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < h5 > Schema< / h5 > < pre > < code > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "object"< / span > < / span > ,
"< span class = "hljs-attribute" > properties< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > message< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The detailed error message"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > success< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span > < / span > ,
"< span class = "hljs-attribute" > description< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "The success status of the request"< / span >
< / span > }< / span > ,
"< span class = "hljs-attribute" > data< / span > ": < span class = "hljs-value" > {
"< span class = "hljs-attribute" > type< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "string"< / span >
< / span > }
< / span > }< / span > ,
"< span class = "hljs-attribute" > $schema< / span > ": < span class = "hljs-value" > < span class = "hljs-string" > "http://json-schema.org/draft-04/schema#"< / span >
2015-12-27 02:48:10 +00:00
< / span > }< / code > < / pre > < div style = "height: 1px;" > < / div > < / div > < / div > < / div > < / div > < / section > < / div > < / div > < / div > < p style = "text-align: center;" class = "text-muted" > Generated by < a href = "https://github.com/danielgtaylor/aglio" class = "aglio" > aglio< / a > on 27 Dec 2015< / p > < script > / * e s l i n t - e n v b r o w s e r * /
2015-12-26 04:09:32 +00:00
/* eslint quotes: [2, "single"] */
'use strict';
/*
Determine if a string ends with another string.
*/
function endsWith(str, suffix) {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
}
/*
Get an array [width, height] of the window.
*/
function getWindowDimensions() {
var w = window,
d = document,
e = d.documentElement,
g = d.body,
x = w.innerWidth || e.clientWidth || g.clientWidth,
y = w.innerHeight || e.clientHeight || g.clientHeight;
return [x, y];
}
/*
Collapse or show a request/response example.
*/
function toggleCollapseButton(event) {
var button = event.target.parentNode;
var content = button.parentNode.nextSibling;
var inner = content.children[0];
if (button.className.indexOf('collapse-button') === -1) {
// Clicked without hitting the right element?
return;
}
if (content.style.maxHeight & & content.style.maxHeight !== '0px') {
// Currently showing, so let's hide it
button.className = 'collapse-button';
content.style.maxHeight = '0px';
} else {
// Currently hidden, so let's show it
button.className = 'collapse-button show';
content.style.maxHeight = inner.offsetHeight + 12 + 'px';
}
}
/*
Collapse or show a navigation menu. It will not be hidden unless it
is currently selected or `force` has been passed.
*/
function toggleCollapseNav(event, force) {
var heading = event.target.parentNode;
var content = heading.nextSibling;
var inner = content.children[0];
if (heading.className.indexOf('heading') === -1) {
// Clicked without hitting the right element?
return;
}
if (content.style.maxHeight & & content.style.maxHeight !== '0px') {
// Currently showing, so let's hide it, but only if this nav item
// is already selected. This prevents newly selected items from
// collapsing in an annoying fashion.
if (force || window.location.hash & & endsWith(event.target.href, window.location.hash)) {
content.style.maxHeight = '0px';
}
} else {
// Currently hidden, so let's show it
content.style.maxHeight = inner.offsetHeight + 12 + 'px';
}
}
/*
Refresh the page after a live update from the server. This only
works in live preview mode (using the `--server` parameter).
*/
function refresh(body) {
document.querySelector('body').className = 'preload';
document.body.innerHTML = body;
// Re-initialize the page
init();
autoCollapse();
document.querySelector('body').className = '';
}
/*
Determine which navigation items should be auto-collapsed to show as many
as possible on the screen, based on the current window height. This also
collapses them.
*/
function autoCollapse() {
var windowHeight = getWindowDimensions()[1];
var itemsHeight = 64; /* Account for some padding */
var itemsArray = Array.prototype.slice.call(
document.querySelectorAll('nav .resource-group .heading'));
// Get the total height of the navigation items
itemsArray.forEach(function (item) {
itemsHeight += item.parentNode.offsetHeight;
});
// Should we auto-collapse any nav items? Try to find the smallest item
// that can be collapsed to show all items on the screen. If not possible,
// then collapse the largest item and do it again. First, sort the items
// by height from smallest to largest.
var sortedItems = itemsArray.sort(function (a, b) {
return a.parentNode.offsetHeight - b.parentNode.offsetHeight;
});
while (sortedItems.length & & itemsHeight > windowHeight) {
for (var i = 0; i < sortedItems.length ; i + + ) {
// Will collapsing this item help?
var itemHeight = sortedItems[i].nextSibling.offsetHeight;
if ((itemsHeight - itemHeight < = windowHeight) || i === sortedItems.length - 1) {
// It will, so let's collapse it, remove its content height from
// our total and then remove it from our list of candidates
// that can be collapsed.
itemsHeight -= itemHeight;
toggleCollapseNav({target: sortedItems[i].children[0]}, true);
sortedItems.splice(i, 1);
break;
}
}
}
}
/*
Initialize the interactive functionality of the page.
*/
function init() {
var i;
// Make collapse buttons clickable
var buttons = document.querySelectorAll('.collapse-button');
for (i = 0; i < buttons.length ; i + + ) {
buttons[i].onclick = toggleCollapseButton;
// Show by default? Then toggle now.
if (buttons[i].className.indexOf('show') !== -1) {
toggleCollapseButton({target: buttons[i].children[0]});
}
}
// Make nav items clickable to collapse/expand their content.
var navItems = document.querySelectorAll('nav .resource-group .heading');
for (i = 0; i < navItems.length ; i + + ) {
navItems[i].onclick = toggleCollapseNav;
// Show all by default
toggleCollapseNav({target: navItems[i].children[0]});
}
}
// Initial call to set up buttons
init();
window.onload = function () {
autoCollapse();
// Remove the `preload` class to enable animations
document.querySelector('body').className = '';
};
< / script > < / body > < / html >
2015-12-27 02:48:10 +00:00
{{ end }}