List

Preview
GET
https://api.senditly.ai/v1/mailing_lists
List mailing lists
This API is in preview. It may be changed in the future.
List mailing lists
cURL
JavaScript
curl -X GET https://api.senditly.ai/v1/mailing_lists \
     -H "Authorization: Bearer <API_KEY>" \
     -H "Content-Type: application/json"
try {
  const response = await fetch('https://api.senditly.ai/v1/mailing_lists', {
     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
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.
Response
+-Hide 3 propertiesShow 3 properties
items
object[]
required
+-Hide 7 propertiesShow 7 properties
id
string
required
The id of the mailing list.
name
string
required
The name of the mailing list.
description
string
required
The description of the mailing list.
policy
enum
required
The policy of the mailing list.
status
enum
required
The status of the mailing list.
createdAt
string
required
A date string in ISO 8601 format when the mailing list was created.
updatedAt
string
required
A date string in ISO 8601 format when the mailing list 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/mailing_lists/count
Count mailing lists
This API is in preview. It may be changed in the future.
Count mailing lists
cURL
JavaScript
curl -X GET https://api.senditly.ai/v1/mailing_lists/count \
     -H "Authorization: Bearer <API_KEY>" \
     -H "Content-Type: application/json"
try {
  const response = await fetch('https://api.senditly.ai/v1/mailing_lists/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 2 propertiesShow 2 properties
after
string
optional
A cursor to start the count from.
before
string
optional
A cursor to end the count at.
Response
+-Hide 1 propertiesShow 1 properties
count
integer
required
The total number of items.

Create

Preview
POST
https://api.senditly.ai/v1/mailing_lists
Create a mailing list
This API is in preview. It may be changed in the future.
Create a mailing list
cURL
JavaScript
curl -X POST https://api.senditly.ai/v1/mailing_lists \
     -H "Authorization: Bearer <API_KEY>" \
     -H "Content-Type: application/json" \
     -d '{ ... request json ... }'
try {
  const response = await fetch('https://api.senditly.ai/v1/mailing_lists', {
     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 5 propertiesShow 5 properties
id
string
optional
The id of the mailing list. If not provided, a new id will be generated. This should be an unique identifier for the mailing list.
name
string
required
The name of the mailing list.
description
string
required
The description of the mailing list.
policy
enum
required
The policy of the mailing list.
active
boolean
optional
Whether the mailing list is active.
Response
The mailing list.
+-Hide 7 propertiesShow 7 properties
id
string
required
The id of the mailing list.
name
string
required
The name of the mailing list.
description
string
required
The description of the mailing list.
policy
enum
required
The policy of the mailing list.
status
enum
required
The status of the mailing list.
createdAt
string
required
A date string in ISO 8601 format when the mailing list was created.
updatedAt
string
required
A date string in ISO 8601 format when the mailing list was last updated.

Retrieve

Preview
GET
https://api.senditly.ai/v1/mailing_lists/:id
Retrieve a mailing list
This API is in preview. It may be changed in the future.
Retrieve a mailing list
cURL
JavaScript
curl -X GET https://api.senditly.ai/v1/mailing_lists/:id \
     -H "Authorization: Bearer <API_KEY>" \
     -H "Content-Type: application/json"
try {
  const response = await fetch('https://api.senditly.ai/v1/mailing_lists/: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 mailing list.
Response
The mailing list.
+-Hide 7 propertiesShow 7 properties
id
string
required
The id of the mailing list.
name
string
required
The name of the mailing list.
description
string
required
The description of the mailing list.
policy
enum
required
The policy of the mailing list.
status
enum
required
The status of the mailing list.
createdAt
string
required
A date string in ISO 8601 format when the mailing list was created.
updatedAt
string
required
A date string in ISO 8601 format when the mailing list was last updated.

Update

Preview
POST
https://api.senditly.ai/v1/mailing_lists/:id
Update a mailing list
This API is in preview. It may be changed in the future.
Update a mailing list
cURL
JavaScript
curl -X POST https://api.senditly.ai/v1/mailing_lists/:id \
     -H "Authorization: Bearer <API_KEY>" \
     -H "Content-Type: application/json" \
     -d '{ ... request json ... }'
try {
  const response = await fetch('https://api.senditly.ai/v1/mailing_lists/:id', {
     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.
Parameters
+-Hide 1 propertiesShow 1 properties
id
string
required
The id of the mailing list.
Request
+-Hide 4 propertiesShow 4 properties
name
string
optional
The name of the mailing list.
description
string
optional
The description of the mailing list.
policy
enum
optional
The policy of the mailing list.
active
boolean
optional
Whether the mailing list is active.
Response
The mailing list.
+-Hide 7 propertiesShow 7 properties
id
string
required
The id of the mailing list.
name
string
required
The name of the mailing list.
description
string
required
The description of the mailing list.
policy
enum
required
The policy of the mailing list.
status
enum
required
The status of the mailing list.
createdAt
string
required
A date string in ISO 8601 format when the mailing list was created.
updatedAt
string
required
A date string in ISO 8601 format when the mailing list was last updated.

Delete

Preview
DEL
https://api.senditly.ai/v1/mailing_lists/:id
Delete a mailing list
This API is in preview. It may be changed in the future.
Delete a mailing list
cURL
JavaScript
curl -X DELETE https://api.senditly.ai/v1/mailing_lists/:id \
     -H "Authorization: Bearer <API_KEY>" \
     -H "Content-Type: application/json"
try {
  const response = await fetch('https://api.senditly.ai/v1/mailing_lists/: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 mailing list.
Response
+-Hide 1 propertiesShow 1 properties
startedAt
string
required
A date string in ISO 8601 format when the mailing list deletion was started.