openapi: 3.0.3 info: title: Hilos Contact WhatsApp API version: 1.0.0 description: 'All of the below API endpoints require API key authentication, get your token at https://app.hilos.io/dev/api-keys. To use this token, send with every request an `Authorization: Token ` header. Production API server is located at api.hilos.io using HTTPS. No versioning info is required for now.' servers: - url: https://api.hilos.io description: Production Server security: - tokenAuth: [] tags: - name: WhatsApp paths: /api/channels/whatsapp/template: get: tags: - WhatsApp summary: List WhatsApp Templates description: Lists WhatsApp Templates. You can search with the `name` and `status` fields using the `?seach=my-template-name` query parameter. operationId: List WhatsApp Templates parameters: - in: query name: category schema: type: string enum: - ACCOUNT_UPDATE - ALERT_UPDATE - APPOINTMENT_UPDATE - AUTHENTICATION - AUTO_REPLY - ISSUE_RESOLUTION - MARKETING - OTP - PAYMENT_UPDATE - PERSONAL_FINANCE_UPDATE - RESERVATION_UPDATE - SHIPPING_UPDATE - TICKET_UPDATE - TRANSACTIONAL - TRANSPORTATION_UPDATE - UTILITY - in: query name: category__in schema: type: array items: type: string description: Multiple values may be separated by commas. explode: false style: form - in: query name: channel schema: type: integer - in: query name: channel__in schema: type: array items: type: integer description: Multiple values may be separated by commas. explode: false style: form - name: ordering required: false in: query description: Which field to use when ordering the results. schema: type: string - name: page required: false in: query description: A page number within the paginated result set. schema: type: integer - name: page_size required: false in: query description: Number of results to return per page. schema: type: integer - name: search required: false in: query description: A search term. schema: type: string - in: query name: status schema: type: string enum: - approved - deleted - disabled - draft - in_appeal - pending - pending_deletion - rejected - submitted - in: query name: status__in schema: type: array items: type: string description: Multiple values may be separated by commas. explode: false style: form responses: '200': content: application/json: schema: $ref: '#/components/schemas/PaginatedWhatsAppTemplateSimpleReadList' description: '' security: - tokenAuth: [] /api/channels/whatsapp/template/{id}: delete: tags: - WhatsApp summary: Delete WhatsApp Template description: Deletes a WhatsApp Template by Id. operationId: Delete WhatsApp Template parameters: - in: path name: id schema: type: string format: uuid required: true responses: '204': description: No response body security: - tokenAuth: [] get: tags: - WhatsApp summary: Get WhatsApp Template description: Gets a WhatsApp Template by Id. operationId: Get WhatsApp Template parameters: - in: path name: id schema: type: string format: uuid required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/WhatsAppTemplateRead' description: '' security: - tokenAuth: [] /api/channels/whatsapp/template/{id}/send: post: tags: - WhatsApp summary: Send a WhatsApp Template description: 'Send a single WhatsApp message: select a template to use and call our endpoint with the recipient phone number and the variables the template needs. That''s it!' operationId: Send a WhatsApp Template Message parameters: - in: path name: id schema: type: string format: uuid description: Template Id required: true examples: TheTemplateIdThatWeWantToSend: value: a3ff7ee5-0c11-49e2-a0d6-7e316626f7b1 summary: The Template Id that we want to send requestBody: content: application/json: schema: $ref: '#/components/schemas/WhatsAppTemplateSend' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/WhatsAppTemplateSend' multipart/form-data: schema: $ref: '#/components/schemas/WhatsAppTemplateSend' required: true responses: '201': content: application/json: schema: $ref: '#/components/schemas/WhatsAppTemplateSendPublicResponse' examples: WhatsAppTemplateSendPublicResponse: value: id: a513da3a-8b73-42aa-a938-0eb1e0141533 conversation: ee49ab6c-dfd8-4cb6-a512-5880f4385622 description: Returns the Message Id and its Conversation Id. description: '' security: - tokenAuth: [] components: schemas: ChannelTypeEnum: enum: - WHATSAPP - EMAIL - INSTAGRAM - FB_MESSENGER - TELEGRAM - SMS - VOICE type: string PaginatedWhatsAppTemplateSimpleReadList: type: object properties: count: type: integer example: 123 next: type: string nullable: true format: uri example: http://api.example.org/accounts/?page=4 previous: type: string nullable: true format: uri example: http://api.example.org/accounts/?page=2 results: type: array items: $ref: '#/components/schemas/WhatsAppTemplateSimpleRead' LanguageEnum: enum: - af - sq - ar - az - bn - bg - ca - zh_CN - zh_HK - zh_TW - hr - cs - da - nl - en - en_GB - en_US - et - fil - fi - fr - ka - de - el - gu - ha - he - hi - hu - id - ga - it - ja - kn - kk - rw_RW - ko - ky_KG - lo - lv - lt - mk - ms - ml - mr - nb - fa - pl - pt_BR - pt_PT - pa - ro - ru - sr - sk - sl - es - es_AR - es_ES - es_MX - sw - sv - ta - te - th - tr - uk - ur - uz - vi - zu type: string WhatsAppTemplateSend: type: object properties: variables: type: array items: type: string description: An array of variables to be used in the WhatsApp Template. Variables are taken in order HEADER, BODY and BUTTONs. (e.g. position 0 corresponds to the HEADER (if it exists) or variable {{1}}, position 1 to variable {{2}} and so on. phone: type: string description: The phone number to send the WhatsApp Template to. maxLength: 20 required: - phone WhatsAppTemplateSendPublicResponse: type: object properties: id: type: string format: uuid description: Message Id conversation: type: string format: uuid description: Message Conversation Id required: - conversation - id ChannelStatusEnum: enum: - NEW - ACTIVE - INACTIVE type: string CategoryEnum: enum: - ACCOUNT_UPDATE - PAYMENT_UPDATE - PERSONAL_FINANCE_UPDATE - SHIPPING_UPDATE - RESERVATION_UPDATE - ISSUE_RESOLUTION - APPOINTMENT_UPDATE - TRANSPORTATION_UPDATE - TICKET_UPDATE - ALERT_UPDATE - AUTO_REPLY - TRANSACTIONAL - MARKETING - OTP - AUTHENTICATION - UTILITY type: string ChannelProviderEnum: enum: - META_CLOUD_API - TECH_PROVIDER_CLOUD_API - D360_CLOUD_API - 360DIALOG type: string WhatsAppTemplateRead: type: object properties: name: type: string maxLength: 120 language: $ref: '#/components/schemas/LanguageEnum' components: type: object additionalProperties: {} nullable: true id: type: string format: uuid readOnly: true description: The UUID of the WhatsApp Template to be sent. category: $ref: '#/components/schemas/CategoryEnum' status: $ref: '#/components/schemas/WhatsAppTemplateStatusEnum' rejected_reason: type: string nullable: true is_deleted: type: boolean channel: allOf: - $ref: '#/components/schemas/SimpleChannel' readOnly: true description: The ID of the WhatsApp Channel that the WhatsApp Template is for. is_sample: type: boolean required: - category - channel - id - language - name SimpleChannel: type: object properties: id: type: integer readOnly: true channel_type: $ref: '#/components/schemas/ChannelTypeEnum' name: type: string maxLength: 100 channel_id: type: string maxLength: 100 status: $ref: '#/components/schemas/ChannelStatusEnum' created_on: type: string format: date-time title: Creado el channel_provider: $ref: '#/components/schemas/ChannelProviderEnum' is_sandbox: type: boolean required: - channel_id - id WhatsAppTemplateStatusEnum: enum: - draft - approved - in_appeal - pending - rejected - pending_deletion - deleted - disabled - submitted type: string WhatsAppTemplateSimpleRead: type: object properties: name: type: string maxLength: 120 language: $ref: '#/components/schemas/LanguageEnum' components: type: object additionalProperties: {} nullable: true id: type: string format: uuid readOnly: true description: The UUID of the WhatsApp Template to be sent. category: $ref: '#/components/schemas/CategoryEnum' status: $ref: '#/components/schemas/WhatsAppTemplateStatusEnum' rejected_reason: type: string nullable: true is_deleted: type: boolean channel: allOf: - $ref: '#/components/schemas/SimpleChannel' description: The ID of the WhatsApp Channel that the WhatsApp Template is for. required: - category - channel - id - language - name securitySchemes: tokenAuth: type: apiKey in: header name: Authorization description: Token-based authentication with required prefix "Token"