List

Preview
GET
https://api.senditly.ai/v1/templates
List templates
This API is in preview. It may be changed in the future.
List templates
cURL
JavaScript
curl -X GET https://api.senditly.ai/v1/templates \
     -H "Authorization: Bearer <API_KEY>" \
     -H "Content-Type: application/json"
try {
  const response = await fetch('https://api.senditly.ai/v1/templates', {
     method: 'GET',
     headers: {
        Authorization: 'Bearer <API_KEY>',
     },
     body: JSON.stringify({ ... request json ... }),
  });
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
Headers
+-Hide 1 propertiesShow 1 properties
Authorization
string
required
Bearer authentication of the form "Bearer <API_KEY>", where API_KEY is your api key.
Query
+-Hide 4 propertiesShow 4 properties
limit
integer
optional
A limit on the number of items to return. Defaults to 10. The value must be between 1 and 100.
startingAfter
string
optional
A cursor to start the list from. Defaults to the first item.
endingBefore
string
optional
A cursor to end the list at. Defaults to the last item.
label
string
optional
Label selector expression.
Response
+-Hide 3 propertiesShow 3 properties
items
object[]
required
+-Hide 8 propertiesShow 8 properties
id
string
required
The id of the template.
name
string
required
The name of the template.
description
string
required
The description of the template.
spec
one of
required
The specification of the template.
+-Hide 1 variantsShow 1 variants
object
"email"
+-Hide 8 propertiesShow 8 properties
type
"email"
required
from
object
required
The sender of the email.
+-Hide 2 propertiesShow 2 properties
name
string
optional
The name of the address.
address
string
required
The email address of the address.
replyTo
object[]
optional
The reply-to email addresses.
+-Hide 2 propertiesShow 2 properties
name
string
optional
The name of the address.
address
string
required
The email address of the address.
subject
string
required
The subject of the email.
preview
string
optional
The preview of the email.
template
MessageTemplate
required
The template of the email.
tracking
object
optional
The tracking of the email.
+-Hide 2 propertiesShow 2 properties
link
boolean
optional
Whether to enable link tracking. By default, `false`.
open
boolean
optional
Whether to enable open tracking. By default, `false`.
raw
object
optional
The raw parts of the email. When this is specified, the template will not be used.
+-Hide 3 propertiesShow 3 properties
html
string
optional
The raw HTML part of the email. When this is specified, the template will not be used.
text
string
optional
The raw TEXT part of the email. When this is specified, the template will not be used.
listUnsubscribe
string
optional
The raw list unsubscribe url of the email. When this is specified, the template will not be used.
labels
{ [key: string]: string }
required
The labels of the template.
string
ownerId
string
required
The account id for the owner of the template.
createdAt
string
required
A date string in ISO 8601 format when the template was created.
updatedAt
string
required
A date string in ISO 8601 format when the template was last updated.
hasMore
boolean
required
Whether there are more items to fetch.
cursor
string
optional
A cursor to start the next list from.

Count

Preview
GET
https://api.senditly.ai/v1/templates/count
Count templates
This API is in preview. It may be changed in the future.
Count templates
cURL
JavaScript
curl -X GET https://api.senditly.ai/v1/templates/count \
     -H "Authorization: Bearer <API_KEY>" \
     -H "Content-Type: application/json"
try {
  const response = await fetch('https://api.senditly.ai/v1/templates/count', {
     method: 'GET',
     headers: {
        Authorization: 'Bearer <API_KEY>',
     },
     body: JSON.stringify({ ... request json ... }),
  });
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
Headers
+-Hide 1 propertiesShow 1 properties
Authorization
string
required
Bearer authentication of the form "Bearer <API_KEY>", where API_KEY is your api key.
Query
+-Hide 3 propertiesShow 3 properties
after
string
optional
A cursor to start the count from.
before
string
optional
A cursor to end the count at.
label
string
optional
Label selector expression.
Response
+-Hide 1 propertiesShow 1 properties
count
integer
required
The total number of items.

Create

Preview
POST
https://api.senditly.ai/v1/templates
Create a template
This API is in preview. It may be changed in the future.
Create a template
cURL
JavaScript
curl -X POST https://api.senditly.ai/v1/templates \
     -H "Authorization: Bearer <API_KEY>" \
     -H "Content-Type: application/json" \
     -d '{ ... request json ... }'
try {
  const response = await fetch('https://api.senditly.ai/v1/templates', {
     method: 'POST',
     headers: {
        Authorization: 'Bearer <API_KEY>',
        'Content-Type': 'application/json',
     },
     body: JSON.stringify({ ... request json ... }),
  });
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
Headers
+-Hide 1 propertiesShow 1 properties
Authorization
string
required
Bearer authentication of the form "Bearer <API_KEY>", where API_KEY is your api key.
Request
+-Hide 4 propertiesShow 4 properties
name
string
optional
The name of the template.
description
string
optional
The description of the template.
spec
one of
required
The specification of the template.
+-Hide 1 variantsShow 1 variants
object
"email"
+-Hide 8 propertiesShow 8 properties
type
"email"
required
from
object
required
The sender of the email.
+-Hide 2 propertiesShow 2 properties
name
string
optional
The name of the address.
address
string
required
The email address of the address.
replyTo
object[]
optional
The reply-to email addresses.
+-Hide 2 propertiesShow 2 properties
name
string
optional
The name of the address.
address
string
required
The email address of the address.
subject
string
required
The subject of the email.
preview
string
optional
The preview of the email.
template
MessageTemplate
required
The template of the email.
tracking
object
optional
The tracking of the email.
+-Hide 2 propertiesShow 2 properties
link
boolean
optional
Whether to enable link tracking. By default, `false`.
open
boolean
optional
Whether to enable open tracking. By default, `false`.
raw
object
optional
The raw parts of the email. When this is specified, the template will not be used.
+-Hide 3 propertiesShow 3 properties
html
string
optional
The raw HTML part of the email. When this is specified, the template will not be used.
text
string
optional
The raw TEXT part of the email. When this is specified, the template will not be used.
listUnsubscribe
string
optional
The raw list unsubscribe url of the email. When this is specified, the template will not be used.
labels
{ [key: string]: string }
optional
The labels of the template.
string
Response
The template.
+-Hide 8 propertiesShow 8 properties
id
string
required
The id of the template.
name
string
required
The name of the template.
description
string
required
The description of the template.
spec
one of
required
The specification of the template.
+-Hide 1 variantsShow 1 variants
object
"email"
+-Hide 8 propertiesShow 8 properties
type
"email"
required
from
object
required
The sender of the email.
+-Hide 2 propertiesShow 2 properties
name
string
optional
The name of the address.
address
string
required
The email address of the address.
replyTo
object[]
optional
The reply-to email addresses.
+-Hide 2 propertiesShow 2 properties
name
string
optional
The name of the address.
address
string
required
The email address of the address.
subject
string
required
The subject of the email.
preview
string
optional
The preview of the email.
template
MessageTemplate
required
The template of the email.
tracking
object
optional
The tracking of the email.
+-Hide 2 propertiesShow 2 properties
link
boolean
optional
Whether to enable link tracking. By default, `false`.
open
boolean
optional
Whether to enable open tracking. By default, `false`.
raw
object
optional
The raw parts of the email. When this is specified, the template will not be used.
+-Hide 3 propertiesShow 3 properties
html
string
optional
The raw HTML part of the email. When this is specified, the template will not be used.
text
string
optional
The raw TEXT part of the email. When this is specified, the template will not be used.
listUnsubscribe
string
optional
The raw list unsubscribe url of the email. When this is specified, the template will not be used.
labels
{ [key: string]: string }
required
The labels of the template.
string
ownerId
string
required
The account id for the owner of the template.
createdAt
string
required
A date string in ISO 8601 format when the template was created.
updatedAt
string
required
A date string in ISO 8601 format when the template was last updated.

Retrieve

Preview
GET
https://api.senditly.ai/v1/templates/:id
Retrieve a template
This API is in preview. It may be changed in the future.
Retrieve a template
cURL
JavaScript
curl -X GET https://api.senditly.ai/v1/templates/:id \
     -H "Authorization: Bearer <API_KEY>" \
     -H "Content-Type: application/json"
try {
  const response = await fetch('https://api.senditly.ai/v1/templates/:id', {
     method: 'GET',
     headers: {
        Authorization: 'Bearer <API_KEY>',
     },
     body: JSON.stringify({ ... request json ... }),
  });
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
Headers
+-Hide 1 propertiesShow 1 properties
Authorization
string
required
Bearer authentication of the form "Bearer <API_KEY>", where API_KEY is your api key.
Parameters
+-Hide 1 propertiesShow 1 properties
id
string
required
The id of the template.
Response
The template.
+-Hide 8 propertiesShow 8 properties
id
string
required
The id of the template.
name
string
required
The name of the template.
description
string
required
The description of the template.
spec
one of
required
The specification of the template.
+-Hide 1 variantsShow 1 variants
object
"email"
+-Hide 8 propertiesShow 8 properties
type
"email"
required
from
object
required
The sender of the email.
+-Hide 2 propertiesShow 2 properties
name
string
optional
The name of the address.
address
string
required
The email address of the address.
replyTo
object[]
optional
The reply-to email addresses.
+-Hide 2 propertiesShow 2 properties
name
string
optional
The name of the address.
address
string
required
The email address of the address.
subject
string
required
The subject of the email.
preview
string
optional
The preview of the email.
template
MessageTemplate
required
The template of the email.
tracking
object
optional
The tracking of the email.
+-Hide 2 propertiesShow 2 properties
link
boolean
optional
Whether to enable link tracking. By default, `false`.
open
boolean
optional
Whether to enable open tracking. By default, `false`.
raw
object
optional
The raw parts of the email. When this is specified, the template will not be used.
+-Hide 3 propertiesShow 3 properties
html
string
optional
The raw HTML part of the email. When this is specified, the template will not be used.
text
string
optional
The raw TEXT part of the email. When this is specified, the template will not be used.
listUnsubscribe
string
optional
The raw list unsubscribe url of the email. When this is specified, the template will not be used.
labels
{ [key: string]: string }
required
The labels of the template.
string
ownerId
string
required
The account id for the owner of the template.
createdAt
string
required
A date string in ISO 8601 format when the template was created.
updatedAt
string
required
A date string in ISO 8601 format when the template was last updated.

Update

Preview
PUT
https://api.senditly.ai/v1/templates/:id
Update a template
This API is in preview. It may be changed in the future.
Update a template
cURL
JavaScript
curl -X PUT https://api.senditly.ai/v1/templates/:id \
     -H "Authorization: Bearer <API_KEY>" \
     -H "Content-Type: application/json" \
     -d '{ ... request json ... }'
try {
  const response = await fetch('https://api.senditly.ai/v1/templates/:id', {
     method: 'PUT',
     headers: {
        Authorization: 'Bearer <API_KEY>',
        'Content-Type': 'application/json',
     },
     body: JSON.stringify({ ... request json ... }),
  });
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
Headers
+-Hide 1 propertiesShow 1 properties
Authorization
string
required
Bearer authentication of the form "Bearer <API_KEY>", where API_KEY is your api key.
Parameters
+-Hide 1 propertiesShow 1 properties
id
string
required
The id of the template.
Request
+-Hide 4 propertiesShow 4 properties
name
string
optional
The name of the template.
description
string
optional
The description of the template.
labels
{ [key: string]: string }
optional
The labels of the template.
string
spec
one of
optional
The specification of the template.
+-Hide 1 variantsShow 1 variants
object
"email"
+-Hide 8 propertiesShow 8 properties
type
"email"
required
from
object
required
The sender of the email.
+-Hide 2 propertiesShow 2 properties
name
string
optional
The name of the address.
address
string
required
The email address of the address.
replyTo
object[]
optional
The reply-to email addresses.
+-Hide 2 propertiesShow 2 properties
name
string
optional
The name of the address.
address
string
required
The email address of the address.
subject
string
required
The subject of the email.
preview
string
optional
The preview of the email.
template
MessageTemplate
required
The template of the email.
tracking
object
optional
The tracking of the email.
+-Hide 2 propertiesShow 2 properties
link
boolean
optional
Whether to enable link tracking. By default, `false`.
open
boolean
optional
Whether to enable open tracking. By default, `false`.
raw
object
optional
The raw parts of the email. When this is specified, the template will not be used.
+-Hide 3 propertiesShow 3 properties
html
string
optional
The raw HTML part of the email. When this is specified, the template will not be used.
text
string
optional
The raw TEXT part of the email. When this is specified, the template will not be used.
listUnsubscribe
string
optional
The raw list unsubscribe url of the email. When this is specified, the template will not be used.
Response
The template.
+-Hide 8 propertiesShow 8 properties
id
string
required
The id of the template.
name
string
required
The name of the template.
description
string
required
The description of the template.
spec
one of
required
The specification of the template.
+-Hide 1 variantsShow 1 variants
object
"email"
+-Hide 8 propertiesShow 8 properties
type
"email"
required
from
object
required
The sender of the email.
+-Hide 2 propertiesShow 2 properties
name
string
optional
The name of the address.
address
string
required
The email address of the address.
replyTo
object[]
optional
The reply-to email addresses.
+-Hide 2 propertiesShow 2 properties
name
string
optional
The name of the address.
address
string
required
The email address of the address.
subject
string
required
The subject of the email.
preview
string
optional
The preview of the email.
template
MessageTemplate
required
The template of the email.
tracking
object
optional
The tracking of the email.
+-Hide 2 propertiesShow 2 properties
link
boolean
optional
Whether to enable link tracking. By default, `false`.
open
boolean
optional
Whether to enable open tracking. By default, `false`.
raw
object
optional
The raw parts of the email. When this is specified, the template will not be used.
+-Hide 3 propertiesShow 3 properties
html
string
optional
The raw HTML part of the email. When this is specified, the template will not be used.
text
string
optional
The raw TEXT part of the email. When this is specified, the template will not be used.
listUnsubscribe
string
optional
The raw list unsubscribe url of the email. When this is specified, the template will not be used.
labels
{ [key: string]: string }
required
The labels of the template.
string
ownerId
string
required
The account id for the owner of the template.
createdAt
string
required
A date string in ISO 8601 format when the template was created.
updatedAt
string
required
A date string in ISO 8601 format when the template was last updated.

Delete

Preview
DEL
https://api.senditly.ai/v1/templates/:id
Delete a template
This API is in preview. It may be changed in the future.
Delete a template
cURL
JavaScript
curl -X DELETE https://api.senditly.ai/v1/templates/:id \
     -H "Authorization: Bearer <API_KEY>" \
     -H "Content-Type: application/json"
try {
  const response = await fetch('https://api.senditly.ai/v1/templates/:id', {
     method: 'DELETE',
     headers: {
        Authorization: 'Bearer <API_KEY>',
     },
     body: JSON.stringify({ ... request json ... }),
  });
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
Headers
+-Hide 1 propertiesShow 1 properties
Authorization
string
required
Bearer authentication of the form "Bearer <API_KEY>", where API_KEY is your api key.
Parameters
+-Hide 1 propertiesShow 1 properties
id
string
required
The id of the template.
Response
+-Hide 1 propertiesShow 1 properties
id
string
required
The id of the template.