---
title: "Create waiting strategy"
method: POST
path: "/ccaas/voice/2/waiting-strategies"
tags: ["customer-engagement", "conversations", "waiting-strategies-calls"]
---

# Create waiting strategy

`POST /ccaas/voice/2/waiting-strategies`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/ccaas/voice/2/waiting-strategies`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `Authorization`
  - HTTP basic
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.infobip.com/auth/1/oauth2/token`

Use this method to add a new waiting strategy. To upload an audio file and get value for fileDescriptor field, use <a href="https://www.infobip.com/docs/api#customer-engagement/anonymize/upload-audio-files" target="_blank">Upload audio files endpoint</a>. <a href="https://www.infobip.com/docs/conversations/supervisor-guide#waiting-strategy-digital-channels" target="_blank">More info</a>.

## Request body

- B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866WaitingStrategyApiRequest
  - `name` string: Waiting strategy name.
  - `maximumWaitTime` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866DurationApiModel, required: Duration information.
    - `unit` 'SECONDS' | 'MINUTES' | 'HOURS', required
    - `value` integer, required
  - `greetingMessage` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866OptionWithFileOrTtsAudioSourceApiModel: File audio source or TTS audio source information.
    - `enabled` boolean
    - `Audio source type` 'TTS' | 'FILE': Specifies whether the audio is from a file source or text-to-speech
    - `ttsAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866TtsAudioSourceApiModel: Text-to-speech audio source information.
      - `text` string, required: Text to convert using text-to-speech. This field supports usage of placeholders. Use the following endpoint to find which placeholders are supported: <a href="https://www.infobip.com/docs/api/customer-engagement/conversations/get-conversations-tts-supported-placeholders" target="_blank">Get supported TTS placeholders for purpose</a>. Placeholders are used to dynamically insert values into the text. For example, you can use placeholders to insert the customer's position in queue as part of announcement message in waiting strategy.
      - `language` string, required: If the message is in text format, the language in which the message is written must be defined for correct pronunciation. In the Languages section, you can find the list of languages that we support: <a href="https://www.infobip.com/docs/voice-and-video/outbound-calls#text-to-speech-voice-over-broadcast" target="_blank">Voice Text-To-Speech Languages.</a>
      - `isLanguageSelectedManually` boolean: This option controls whether automatic language detection will be performed on provided text.
      - `voice` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866VoiceApiModel, required: Used to define voice in which text will be synthesized. To get a list of the supported voices for chosen language use <a href="https://www.infobip.com/docs/api#channels/voice/get-voices" target="_blank">Get voices.</a>
        - `name` string, required: Name of the voice.
        - `gender` string, required: Gender of the voice. Can be MALE or FEMALE.
      - `speechRate` number, double, required: Text-to-speech speech rate.
    - `fileAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866FileAudioSourceApiModel: File audio source information.
      - `fileDescriptor` string: File audio source descriptor.
  - `musicOnHold` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866OptionWithFileAudioSourceApiModel: File audio source information.
    - `enabled` boolean
    - `fileAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866FileAudioSourceApiModel: File audio source information.
      - `fileDescriptor` string: File audio source descriptor.
  - `announcementMessage` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866OptionWithPeriodicCollectApiModel
    - `enabled` boolean
    - `Audio source type` 'TTS' | 'FILE': Specifies whether the audio is from a file source or text-to-speech
    - `ttsAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866TtsAudioSourceApiModel: Text-to-speech audio source information.
      - `text` string, required: Text to convert using text-to-speech. This field supports usage of placeholders. Use the following endpoint to find which placeholders are supported: <a href="https://www.infobip.com/docs/api/customer-engagement/conversations/get-conversations-tts-supported-placeholders" target="_blank">Get supported TTS placeholders for purpose</a>. Placeholders are used to dynamically insert values into the text. For example, you can use placeholders to insert the customer's position in queue as part of announcement message in waiting strategy.
      - `language` string, required: If the message is in text format, the language in which the message is written must be defined for correct pronunciation. In the Languages section, you can find the list of languages that we support: <a href="https://www.infobip.com/docs/voice-and-video/outbound-calls#text-to-speech-voice-over-broadcast" target="_blank">Voice Text-To-Speech Languages.</a>
      - `isLanguageSelectedManually` boolean: This option controls whether automatic language detection will be performed on provided text.
      - `voice` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866VoiceApiModel, required: Used to define voice in which text will be synthesized. To get a list of the supported voices for chosen language use <a href="https://www.infobip.com/docs/api#channels/voice/get-voices" target="_blank">Get voices.</a>
        - `name` string, required: Name of the voice.
        - `gender` string, required: Gender of the voice. Can be MALE or FEMALE.
      - `speechRate` number, double, required: Text-to-speech speech rate.
    - `fileAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866FileAudioSourceApiModel: File audio source information.
      - `fileDescriptor` string: File audio source descriptor.
    - `repeatInterval` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866DurationApiModel: Duration information.
      - `unit` 'SECONDS' | 'MINUTES' | 'HOURS', required
      - `value` integer, required
    - `collectables` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866CollectableApiModel[]
      - `code` string, required: Code attached to the collectable.
      - `action` 'CALLBACK' | 'RETURN_TO_IVR', required: Action type connected to the collectable.
      - `value` string, required: Collectable value.
    - `collectDuration` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866DurationApiModel: Duration information.
      - `unit` 'SECONDS' | 'MINUTES' | 'HOURS', required
      - `value` integer, required
  - `maximumWaitTimeMessage` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866OptionWithFileOrTtsAudioSourceApiModel: File audio source or TTS audio source information.
    - `enabled` boolean
    - `Audio source type` 'TTS' | 'FILE': Specifies whether the audio is from a file source or text-to-speech
    - `ttsAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866TtsAudioSourceApiModel: Text-to-speech audio source information.
      - `text` string, required: Text to convert using text-to-speech. This field supports usage of placeholders. Use the following endpoint to find which placeholders are supported: <a href="https://www.infobip.com/docs/api/customer-engagement/conversations/get-conversations-tts-supported-placeholders" target="_blank">Get supported TTS placeholders for purpose</a>. Placeholders are used to dynamically insert values into the text. For example, you can use placeholders to insert the customer's position in queue as part of announcement message in waiting strategy.
      - `language` string, required: If the message is in text format, the language in which the message is written must be defined for correct pronunciation. In the Languages section, you can find the list of languages that we support: <a href="https://www.infobip.com/docs/voice-and-video/outbound-calls#text-to-speech-voice-over-broadcast" target="_blank">Voice Text-To-Speech Languages.</a>
      - `isLanguageSelectedManually` boolean: This option controls whether automatic language detection will be performed on provided text.
      - `voice` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866VoiceApiModel, required: Used to define voice in which text will be synthesized. To get a list of the supported voices for chosen language use <a href="https://www.infobip.com/docs/api#channels/voice/get-voices" target="_blank">Get voices.</a>
        - `name` string, required: Name of the voice.
        - `gender` string, required: Gender of the voice. Can be MALE or FEMALE.
      - `speechRate` number, double, required: Text-to-speech speech rate.
    - `fileAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866FileAudioSourceApiModel: File audio source information.
      - `fileDescriptor` string: File audio source descriptor.
  - `conditionType` 'SENDER' | 'QUEUE', required: Defines which waiting strategy entity the condition applies to. Once defined, cannot be changed.
  - `condition` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866Condition, required: Defines how the 'condition' field is built, e.g., if 'SENDER', the condition is an object with an array of senders.

## Response `200`

OK

- B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866WaitingStrategyApiResponse
  - `id` string: Unique id of the waiting strategy.
  - `name` string: Waiting strategy name.
  - `maximumWaitTime` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866DurationApiModel: Duration information.
    - `unit` 'SECONDS' | 'MINUTES' | 'HOURS', required
    - `value` integer, required
  - `greetingMessage` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866OptionWithFileOrTtsAudioSourceApiModel: File audio source or TTS audio source information.
    - `enabled` boolean
    - `Audio source type` 'TTS' | 'FILE': Specifies whether the audio is from a file source or text-to-speech
    - `ttsAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866TtsAudioSourceApiModel: Text-to-speech audio source information.
      - `text` string, required: Text to convert using text-to-speech. This field supports usage of placeholders. Use the following endpoint to find which placeholders are supported: <a href="https://www.infobip.com/docs/api/customer-engagement/conversations/get-conversations-tts-supported-placeholders" target="_blank">Get supported TTS placeholders for purpose</a>. Placeholders are used to dynamically insert values into the text. For example, you can use placeholders to insert the customer's position in queue as part of announcement message in waiting strategy.
      - `language` string, required: If the message is in text format, the language in which the message is written must be defined for correct pronunciation. In the Languages section, you can find the list of languages that we support: <a href="https://www.infobip.com/docs/voice-and-video/outbound-calls#text-to-speech-voice-over-broadcast" target="_blank">Voice Text-To-Speech Languages.</a>
      - `isLanguageSelectedManually` boolean: This option controls whether automatic language detection will be performed on provided text.
      - `voice` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866VoiceApiModel, required: Used to define voice in which text will be synthesized. To get a list of the supported voices for chosen language use <a href="https://www.infobip.com/docs/api#channels/voice/get-voices" target="_blank">Get voices.</a>
        - `name` string, required: Name of the voice.
        - `gender` string, required: Gender of the voice. Can be MALE or FEMALE.
      - `speechRate` number, double, required: Text-to-speech speech rate.
    - `fileAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866FileAudioSourceApiModel: File audio source information.
      - `fileDescriptor` string: File audio source descriptor.
  - `musicOnHold` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866OptionWithFileAudioSourceApiModel: File audio source information.
    - `enabled` boolean
    - `fileAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866FileAudioSourceApiModel: File audio source information.
      - `fileDescriptor` string: File audio source descriptor.
  - `announcementMessage` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866OptionWithPeriodicCollectApiModel
    - `enabled` boolean
    - `Audio source type` 'TTS' | 'FILE': Specifies whether the audio is from a file source or text-to-speech
    - `ttsAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866TtsAudioSourceApiModel: Text-to-speech audio source information.
      - `text` string, required: Text to convert using text-to-speech. This field supports usage of placeholders. Use the following endpoint to find which placeholders are supported: <a href="https://www.infobip.com/docs/api/customer-engagement/conversations/get-conversations-tts-supported-placeholders" target="_blank">Get supported TTS placeholders for purpose</a>. Placeholders are used to dynamically insert values into the text. For example, you can use placeholders to insert the customer's position in queue as part of announcement message in waiting strategy.
      - `language` string, required: If the message is in text format, the language in which the message is written must be defined for correct pronunciation. In the Languages section, you can find the list of languages that we support: <a href="https://www.infobip.com/docs/voice-and-video/outbound-calls#text-to-speech-voice-over-broadcast" target="_blank">Voice Text-To-Speech Languages.</a>
      - `isLanguageSelectedManually` boolean: This option controls whether automatic language detection will be performed on provided text.
      - `voice` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866VoiceApiModel, required: Used to define voice in which text will be synthesized. To get a list of the supported voices for chosen language use <a href="https://www.infobip.com/docs/api#channels/voice/get-voices" target="_blank">Get voices.</a>
        - `name` string, required: Name of the voice.
        - `gender` string, required: Gender of the voice. Can be MALE or FEMALE.
      - `speechRate` number, double, required: Text-to-speech speech rate.
    - `fileAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866FileAudioSourceApiModel: File audio source information.
      - `fileDescriptor` string: File audio source descriptor.
    - `repeatInterval` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866DurationApiModel: Duration information.
      - `unit` 'SECONDS' | 'MINUTES' | 'HOURS', required
      - `value` integer, required
    - `collectables` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866CollectableApiModel[]
      - `code` string, required: Code attached to the collectable.
      - `action` 'CALLBACK' | 'RETURN_TO_IVR', required: Action type connected to the collectable.
      - `value` string, required: Collectable value.
    - `collectDuration` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866DurationApiModel: Duration information.
      - `unit` 'SECONDS' | 'MINUTES' | 'HOURS', required
      - `value` integer, required
  - `callbackConfirmationMessage` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866OptionWithFileOrTtsAudioSourceApiModel: File audio source or TTS audio source information.
    - `enabled` boolean
    - `Audio source type` 'TTS' | 'FILE': Specifies whether the audio is from a file source or text-to-speech
    - `ttsAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866TtsAudioSourceApiModel: Text-to-speech audio source information.
      - `text` string, required: Text to convert using text-to-speech. This field supports usage of placeholders. Use the following endpoint to find which placeholders are supported: <a href="https://www.infobip.com/docs/api/customer-engagement/conversations/get-conversations-tts-supported-placeholders" target="_blank">Get supported TTS placeholders for purpose</a>. Placeholders are used to dynamically insert values into the text. For example, you can use placeholders to insert the customer's position in queue as part of announcement message in waiting strategy.
      - `language` string, required: If the message is in text format, the language in which the message is written must be defined for correct pronunciation. In the Languages section, you can find the list of languages that we support: <a href="https://www.infobip.com/docs/voice-and-video/outbound-calls#text-to-speech-voice-over-broadcast" target="_blank">Voice Text-To-Speech Languages.</a>
      - `isLanguageSelectedManually` boolean: This option controls whether automatic language detection will be performed on provided text.
      - `voice` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866VoiceApiModel, required: Used to define voice in which text will be synthesized. To get a list of the supported voices for chosen language use <a href="https://www.infobip.com/docs/api#channels/voice/get-voices" target="_blank">Get voices.</a>
        - `name` string, required: Name of the voice.
        - `gender` string, required: Gender of the voice. Can be MALE or FEMALE.
      - `speechRate` number, double, required: Text-to-speech speech rate.
    - `fileAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866FileAudioSourceApiModel: File audio source information.
      - `fileDescriptor` string: File audio source descriptor.
  - `maximumWaitTimeMessage` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866OptionWithFileOrTtsAudioSourceApiModel: File audio source or TTS audio source information.
    - `enabled` boolean
    - `Audio source type` 'TTS' | 'FILE': Specifies whether the audio is from a file source or text-to-speech
    - `ttsAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866TtsAudioSourceApiModel: Text-to-speech audio source information.
      - `text` string, required: Text to convert using text-to-speech. This field supports usage of placeholders. Use the following endpoint to find which placeholders are supported: <a href="https://www.infobip.com/docs/api/customer-engagement/conversations/get-conversations-tts-supported-placeholders" target="_blank">Get supported TTS placeholders for purpose</a>. Placeholders are used to dynamically insert values into the text. For example, you can use placeholders to insert the customer's position in queue as part of announcement message in waiting strategy.
      - `language` string, required: If the message is in text format, the language in which the message is written must be defined for correct pronunciation. In the Languages section, you can find the list of languages that we support: <a href="https://www.infobip.com/docs/voice-and-video/outbound-calls#text-to-speech-voice-over-broadcast" target="_blank">Voice Text-To-Speech Languages.</a>
      - `isLanguageSelectedManually` boolean: This option controls whether automatic language detection will be performed on provided text.
      - `voice` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866VoiceApiModel, required: Used to define voice in which text will be synthesized. To get a list of the supported voices for chosen language use <a href="https://www.infobip.com/docs/api#channels/voice/get-voices" target="_blank">Get voices.</a>
        - `name` string, required: Name of the voice.
        - `gender` string, required: Gender of the voice. Can be MALE or FEMALE.
      - `speechRate` number, double, required: Text-to-speech speech rate.
    - `fileAudioSource` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866FileAudioSourceApiModel: File audio source information.
      - `fileDescriptor` string: File audio source descriptor.
  - `conditionType` 'SENDER' | 'QUEUE': Defines which waiting strategy entity the condition applies to. Once defined, cannot be changed.
  - `condition` B979cda441a7c661201042835d7dc18eaec3fa68a2905164912469051f8b8866Condition: Defines how the 'condition' field is built, e.g., if 'SENDER', the condition is an object with an array of senders.
  - `createdAt` string, date-time: Time at which the waiting strategy was created.
  - `updatedAt` string, date-time: Time stamp when waiting strategy is updated.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
