POST
/
api
/
custom_template_jobs
/
curl --request POST \
  --url https://api.creatify.ai/api/custom_template_jobs/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: <api-key>' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "name": "<string>",
  "template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "variables": {},
  "webhook_url": "<string>"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "variables": {},
  "media_job": "<string>",
  "video_output": "<string>",
  "preview": "<string>",
  "failed_reason": "<string>",
  "credits_used": 123,
  "duration": 123,
  "status": "pending",
  "progress": 123,
  "webhook_url": "<string>"
}

About Request Data Structure of Webhook

When using ‘custom_templates’ API, if the ‘webhook_url’ is passed in the parameters, we will initiate a POST request to the webhook_url when the task succeeds or fails, with the following content:

{
    'id': 'string',
    'status': 'string',
    'failed_reason': 'string',
    'video_output': 'string',
}

Arguments:

  • id (string): The unique identifier of the job
  • status (string): The status of the job. Possible values are pending, in_queue, running, failed, done
  • failed_reason (string): The reason of the failure if the job failed
  • video_output (string): The URL of the video if the job is done

Note: We might send multiple requests for status changes.

Authorizations

X-API-ID
string
header
required

API ID, from your settings page.

X-API-KEY
string
header
required

API Key, from your settings page.

Body

Response

201 - application/json

The response is of type object.