Service
Create a service
Creates a new automated service.
Only certain types of automated services can be created via the API. Other types of services can only be created via the web app.
Service Types: See x-service-types in the API info section for a machine-readable list of all supported service types and their required configuration parameters.
Cloud Script Services: When creating *_script service types, the code field contains JavaScript that runs in Telerivet's cloud script engine. See https://api.telerivet.com/script.d.ts for the full JavaScript API reference.
post/v1/projects/{project_id}/services
Request
- Base URL: https://api.telerivet.com
- URL: https://api.telerivet.com/v1/projects/{project_id}/services
- Auth: one of:
- HTTP basic
- OAuth 2 (authorization code, authorization URL https://telerivet.com/oauth/authorize, token URL https://api.telerivet.com/oauth/token)
Path parameters
project_idstring required
ID of the Project
Request body
Example request
{
"config": {
"actions": [
{
"type": "reply",
"body": {
"content": "Hello, [[contact.name]]."
}
}
],
"subroutines": [
{
"actions": [
{
"type": "add_contact_to_group",
"group_name": "subscribers"
}
]
}
],
"response_handlers": [
{
"actions": [
{
"type": "reply",
"body": {
"content": "Hello, [[contact.name]]."
}
}
]
}
]
}
}Response
Successful response
Example response
{
"id": "SVee45c8ae4e32889a",
"name": "Poll Service",
"service_type": "messaging_poll",
"active": true,
"priority": 1,
"url": "https://telerivet.com/p/asdf/service/SVee45c8ae4e32889a",
"url_edit": "https://telerivet.com/p/asdf/service/SV2ad0100821a98bea/edit",
"project_id": "PJ2ad0100821a98bea",
"response_table_id": "DTf9fe14d9c306aed9",
"solution_id": "SO2ad0100821a98bea"
}Changes
No recorded changes to this operation across all 1 revision of this API.