curl --request POST \
--url https://api.social-api.ai/v1/queues \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"active": true,
"brand_id": "<string>",
"is_default": false,
"name": "Evenings",
"slots": [
{
"day": "tuesday",
"time": "19:00"
}
],
"timezone": "Europe/Paris"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
active: true,
brand_id: '<string>',
is_default: false,
name: 'Evenings',
slots: [{day: 'tuesday', time: '19:00'}],
timezone: 'Europe/Paris'
})
};
fetch('https://api.social-api.ai/v1/queues', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/queues"
payload = {
"active": True,
"brand_id": "<string>",
"is_default": False,
"name": "Evenings",
"slots": [
{
"day": "tuesday",
"time": "19:00"
}
],
"timezone": "Europe/Paris"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"active": true,
"brand_id": "<string>",
"created_at": "<string>",
"id": "que_01J9Z8Y7X6W5V4T3S2R1Q0P9N8",
"is_default": true,
"name": "Evenings",
"slots": [
{
"day": "tuesday",
"time": "19:00"
}
],
"timezone": "Europe/Paris",
"updated_at": "<string>"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}Create a Queue
Creates a Queue on a Brand: a weekly list of posting times in one timezone. A post created with queue_id takes the earliest free time. day is a lowercase English weekday name and time is HH:MM, both in the Queue’s timezone. A Brand holds at most 20 Queues and always has exactly one default. The first Queue of a Brand becomes its default, and is_default: true makes this one the default.
curl --request POST \
--url https://api.social-api.ai/v1/queues \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"active": true,
"brand_id": "<string>",
"is_default": false,
"name": "Evenings",
"slots": [
{
"day": "tuesday",
"time": "19:00"
}
],
"timezone": "Europe/Paris"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
active: true,
brand_id: '<string>',
is_default: false,
name: 'Evenings',
slots: [{day: 'tuesday', time: '19:00'}],
timezone: 'Europe/Paris'
})
};
fetch('https://api.social-api.ai/v1/queues', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/queues"
payload = {
"active": True,
"brand_id": "<string>",
"is_default": False,
"name": "Evenings",
"slots": [
{
"day": "tuesday",
"time": "19:00"
}
],
"timezone": "Europe/Paris"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"active": true,
"brand_id": "<string>",
"created_at": "<string>",
"id": "que_01J9Z8Y7X6W5V4T3S2R1Q0P9N8",
"is_default": true,
"name": "Evenings",
"slots": [
{
"day": "tuesday",
"time": "19:00"
}
],
"timezone": "Europe/Paris",
"updated_at": "<string>"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Body
Queue definition
Set false to create the Queue paused. Defaults to true.
true
ID of the Brand to create the Queue on. Required.
Set true to make this the Brand's default Queue. The Brand's first Queue is always the default.
false
Queue name. Required.
"Evenings"
Weekly posting times, 1 to 100. Required.
Show child attributes
Show child attributes
IANA timezone the slots are expressed in. Required.
"Europe/Paris"
Response
Created
False when the Queue is paused: no new post can join it.
true
ID of the Brand the Queue belongs to.
When the Queue was created.
Queue ID.
"que_01J9Z8Y7X6W5V4T3S2R1Q0P9N8"
True for the Brand's default Queue, the one queue_id "default" refers to.
true
Queue name.
"Evenings"
Weekly posting times, sorted by day (Monday first) then time.
Show child attributes
Show child attributes
IANA timezone the slots are expressed in.
"Europe/Paris"
When the Queue was last changed.