openapi: 3.0.0
info:
  contact:
    email: developers@abcsalesbot.com
    name: ABC Salesbot
  description: This service provides the backend for ABC Salesbot
  title: Engagematic Public API
  version: '1.0'
paths:
  /v1/attachments/{id}/download:
    get:
      description: Returns a 302 redirect to a short-lived presigned URL for the attachment file.
      parameters:
        - description: The attachment ID
          in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        '302':
          description: Found
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '404':
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: Download an attachment
      tags:
        - Attachments
      operationId: get_v1_attachments_id_download
  /v1/attachments/custom-field-file-url:
    get:
      description: Returns a presigned URL for uploading a file for a "file" custom field, along with the size/type constraints enforced when the upload is confirmed.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldFileUploadURLResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: Get a presigned URL for a "file" custom-field upload
      tags:
        - Attachments
      operationId: get_v1_attachments_custom_field_file_url
    post:
      description: Validates a file uploaded via the presigned URL from GetCustomFieldFileUploadURL against the declared size/type policy, and if valid, records it as an Attachment. Rejects (400) and deletes from S3 a file exceeding the max size or of a disallowed type.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfirmCustomFieldFileUploadRequest'
        description: The URL of the uploaded file
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfirmCustomFieldFileUploadResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: Confirm/finalize a "file" custom-field upload
      tags:
        - Attachments
      operationId: post_v1_attachments_custom_field_file_url
  /v1/automations:
    get:
      description: Returns the automations for the company that owns the API key. Use each `slug_id` under `automations.subscribe`/`unsubscribe`/`replace` when creating a lead via POST /v1/webhooks/leads. Slug ids not listed here are silently ignored by the lead webhook (it still returns 202), so an integrator should look them up here first. `status` (ACTIVE / DISABLED / CANCELLED / FINISHED) tells you whether an automation is live — an automation can be `enabled` yet FINISHED/CANCELLED and therefore inert.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/discovery.AutomationsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: List automations
      tags:
        - Discovery
      operationId: get_v1_automations
  /v1/companies/me:
    get:
      description: Returns the company name associated with the provided API key
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                additionalProperties:
                  type: string
                type: object
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                additionalProperties:
                  type: string
                type: object
      security:
        - Bearer: []
      summary: Get company name by API key
      tags:
        - Companies
      operationId: get_v1_companies_me
  /v1/custom-fields:
    get:
      description: Returns the custom fields defined for the company that owns the API key. Use each `json_key` and `type` to build the `custom_fields` object on POST /v1/webhooks/leads. Sending a key not listed here, or a value whose type does not match, causes the lead webhook to reject the whole request.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/discovery.CustomFieldsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: List custom fields
      tags:
        - Discovery
      operationId: get_v1_custom_fields
  /v1/leads/{leadID}/conversations:
    get:
      description: Retrieve all conversation messages for a given lead ID.
      parameters:
        - description: The lead ID
          in: path
          name: leadID
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationIndexResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: List all conversation messages for a specific lead
      tags:
        - Conversations
      operationId: get_v1_leads_leadID_conversations
  /v1/leads/{leadID}/conversations/reply:
    post:
      description: Send a message to a lead through their messaging channel. The message will be delivered via the lead's configured messaging channel.
      parameters:
        - description: The lead ID
          in: path
          name: leadID
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConversationReplyRequest'
        description: The message to send
        required: true
      responses:
        '201':
          description: Created
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: Send a message to a specific lead
      tags:
        - Conversations
      operationId: post_v1_leads_leadID_conversations_reply
  /v1/messaging-channel-connections:
    get:
      description: Retrieve all messaging channel connections for the authenticated company. Returns a minimal set of data suitable for public API consumption.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging_channel_connections.MessagingChannelConnectionsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: List all messaging channel connections for the current company
      tags:
        - Messaging Channel Connections
      operationId: get_v1_messaging_channel_connections
  /v1/tags:
    get:
      description: Returns the lead tags in use by the company that owns the API key, as a flat list of names. Pass any of these under `tags` when creating a lead via POST /v1/webhooks/leads. Tags are free-text, so a value not listed here is simply created on the fly — this endpoint is a convenience so integrators can reuse existing tags instead of inventing near-duplicates.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/discovery.TagsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: List lead tags
      tags:
        - Discovery
      operationId: get_v1_tags
  /v1/webhook-subscriptions:
    get:
      description: Returns a list of current webhook subscriptions for the authenticated company.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/httpkit.SuccessResponse'
                  - properties:
                      data:
                        items:
                          $ref: '#/components/schemas/models.WebhookConfigurationResponse'
                        type: array
                    type: object
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: List webhook subscriptions
      tags:
        - Webhook Subscriptions
      operationId: get_v1_webhook_subscriptions
    post:
      description: Creates a new webhook subscription for the authenticated company.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhook_subscriptions.CreateWebhookSubscriptionBinding'
        description: Webhook Subscription Data
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/httpkit.SuccessResponse'
                  - properties:
                      data:
                        $ref: '#/components/schemas/models.WebhookConfigurationResponse'
                    type: object
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: Create a new webhook subscription
      tags:
        - Webhook Subscriptions
      operationId: post_v1_webhook_subscriptions
  /v1/webhook-subscriptions/{subscriptionId}:
    delete:
      description: Deletes a webhook subscription.
      parameters:
        - description: The unique ID of the webhook subscription
          in: path
          name: subscriptionId
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '404':
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: Delete a webhook subscription
      tags:
        - Webhook Subscriptions
      operationId: delete_v1_webhook_subscriptions_subscriptionId
    get:
      description: Retrieves details of a specific webhook subscription.
      parameters:
        - description: The unique ID of the webhook subscription
          in: path
          name: subscriptionId
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/httpkit.SuccessResponse'
                  - properties:
                      data:
                        $ref: '#/components/schemas/models.WebhookConfigurationResponse'
                    type: object
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: Get a webhook subscription
      tags:
        - Webhook Subscriptions
      operationId: get_v1_webhook_subscriptions_subscriptionId
    put:
      description: Updates an existing webhook subscription.
      parameters:
        - description: The unique ID of the webhook subscription
          in: path
          name: subscriptionId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhook_subscriptions.UpdateWebhookSubscriptionBinding'
        description: Updated Webhook Subscription Data
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/httpkit.SuccessResponse'
                  - properties:
                      data:
                        $ref: '#/components/schemas/models.WebhookConfigurationResponse'
                    type: object
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: Update a webhook subscription
      tags:
        - Webhook Subscriptions
      operationId: put_v1_webhook_subscriptions_subscriptionId
  /v1/webhook-subscriptions/{subscriptionId}/regenerate-secret:
    post:
      description: Regenerates the secret key for a webhook subscription.
      parameters:
        - description: The unique ID of the webhook subscription
          in: path
          name: subscriptionId
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                allOf:
                  - $ref: '#/components/schemas/httpkit.SuccessResponse'
                  - properties:
                      data:
                        additionalProperties:
                          type: string
                        type: object
                    type: object
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '404':
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: Regenerate webhook subscription secret
      tags:
        - Webhook Subscriptions
      operationId: post_v1_webhook_subscriptions_subscriptionId_regenerate_secret
  /v1/webhook-subscriptions/events:
    get:
      description: Returns all event types that can trigger webhook subscriptions.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/httpkit.SuccessResponse'
                  - properties:
                      data:
                        items:
                          type: string
                        type: array
                    type: object
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      summary: List available event triggers
      tags:
        - Webhook Subscriptions
      operationId: get_v1_webhook_subscriptions_events
  /v1/webhooks/leads:
    post:
      description: Accepts a lead for asynchronous processing. Returns 202 with the lead's external id (echoed or server-minted) once the payload is queued; the lead is created/updated out-of-band. Falls back to synchronous 200/201 when the async pipeline is not configured.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.LeadWebhookPayload'
        description: Lead object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/leads.CreateLeadResponseWrapper'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/leads.CreateLeadResponseWrapper'
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/leads.CreateLeadAsyncResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpkit.ErrorResponse'
      security:
        - Bearer: []
      tags:
        - Leads
      operationId: post_v1_webhooks_leads
      summary: Accepts a lead for asynchronous processing.
servers:
  - url: //api.abcsalesbot.com
components:
  securitySchemes:
    Bearer:
      description: Type "Bearer" followed by a space and API key.
      in: header
      name: Authorization
      type: apiKey
  schemas:
    discovery.AutomationItem:
      properties:
        enabled:
          type: boolean
        name:
          type: string
        slug_id:
          type: string
        status:
          type: string
      type: object
    discovery.AutomationsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/discovery.AutomationItem'
          type: array
        meta: {}
      type: object
    discovery.CustomFieldItem:
      properties:
        json_key:
          type: string
        name:
          type: string
        required:
          type: boolean
        type:
          type: string
      type: object
    discovery.CustomFieldsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/discovery.CustomFieldItem'
          type: array
        meta: {}
      type: object
    discovery.TagsResponse:
      properties:
        data:
          items:
            type: string
          type: array
        meta: {}
      type: object
    ConfirmCustomFieldFileUploadRequest:
      properties:
        file_name:
          type: string
        file_url:
          type: string
      required:
        - file_name
        - file_url
      type: object
    ConfirmCustomFieldFileUploadResponse:
      properties:
        data:
          properties:
            company_id:
              type: integer
            content_type:
              type: string
            created_at:
              type: string
            deleted_at:
              $ref: '#/components/schemas/gorm.DeletedAt'
            extension:
              type: string
            file_name:
              type: string
            id:
              type: integer
            original_file_name:
              type: string
            s3_path:
              type: string
            updated_at:
              type: string
            url:
              type: string
          type: object
      type: object
    CustomFieldFileUploadURLResponse:
      properties:
        data:
          properties:
            allowed_content_types:
              items:
                type: string
              type: array
            max_size_bytes:
              type: integer
            presigned_url:
              type: string
          type: object
      type: object
    ConversationIndexResponse:
      properties:
        data:
          $ref: '#/components/schemas/LeadConversationPayload'
      type: object
    ConversationReplyRequest:
      properties:
        content:
          type: string
        messaging_channel_connection_id:
          type: integer
        s3_attachment:
          type: string
      required:
        - content
      type: object
    LeadConversationPayload:
      properties:
        conversation_messages:
          items:
            $ref: '#/components/schemas/transformers.ConversationsPublicResponse'
          type: array
        is_conversation_session_open:
          type: boolean
        lead_id:
          type: integer
      type: object
    gorm.DeletedAt:
      properties:
        time:
          type: string
        valid:
          description: Valid is true if Time is not NULL
          type: boolean
      type: object
    httpkit.ErrorResponse:
      properties:
        details:
          type: string
        error:
          type: string
      type: object
    httpkit.MessageType:
      enum:
        - error
        - warning
        - success
        - info
      type: string
      x-enum-varnames:
        - MessageTypeError
        - MessageTypeWarning
        - MessageTypeSuccess
        - MessageTypeInfo
    httpkit.Meta:
      properties:
        message:
          type: string
        message_type:
          $ref: '#/components/schemas/httpkit.MessageType'
        next_cursor:
          type: string
        total_results:
          type: integer
        warning:
          type: string
      type: object
    httpkit.SuccessResponse:
      properties:
        data: {}
        meta:
          $ref: '#/components/schemas/httpkit.Meta'
      type: object
    leads.CreateLeadAsyncResponse:
      properties:
        id:
          type: string
        status:
          type: string
      type: object
    leads.CreateLeadResponse:
      properties:
        lead_id:
          type: integer
        was_recently_created:
          type: boolean
      type: object
    leads.CreateLeadResponseWrapper:
      properties:
        data:
          $ref: '#/components/schemas/leads.CreateLeadResponse'
        meta: {}
      type: object
    messaging_channel_connections.MessagingChannelConnectionPublic:
      properties:
        connected:
          type: boolean
        default:
          type: boolean
        id:
          type: integer
        messaging_channel_id:
          type: string
        name:
          type: string
      type: object
    messaging_channel_connections.MessagingChannelConnectionsPayload:
      properties:
        messaging_channel_connections:
          items:
            $ref: '#/components/schemas/messaging_channel_connections.MessagingChannelConnectionPublic'
          type: array
      type: object
    messaging_channel_connections.MessagingChannelConnectionsResponse:
      properties:
        data:
          $ref: '#/components/schemas/messaging_channel_connections.MessagingChannelConnectionsPayload'
      type: object
    models.AutomationSubscriptionRequest:
      properties:
        replace:
          items:
            type: string
          type: array
        subscribe:
          items:
            type: string
          type: array
        unsubscribe:
          items:
            type: string
          type: array
      type: object
    models.LeadWebhookPayload:
      properties:
        automations:
          $ref: '#/components/schemas/models.AutomationSubscriptionRequest'
        currency:
          type: string
        custom_fields:
          items:
            type: integer
          type: array
        email:
          type: string
        id:
          description: |-
            Bounded to the leads.external_id column width (varchar(50)). On the async
            ingest path an oversized id is re-marshalled into the queued payload and
            would 500 on the DB write in the consumer (poison loop to DLQ); cap it here
            so it returns a clean 400 at the edge instead.
          maxLength: 50
          type: string
        locale:
          type: string
        name:
          maxLength: 100
          minLength: 2
          type: string
        naver_line_id:
          description: |-
            NaverLineId is the LINE user ID. Accepted as a lookup/upsert identifier
            for LINE-channel leads; takes precedence over phone when both are supplied.
            Bounded to the leads.naver_line_id column width (varchar(50)) so an
            oversized value returns 400 rather than a 500 from the DB write.
            Note: naver_line_display_name is intentionally NOT accepted here — it is
            sourced from the LINE platform on the inbound messaging flow, not from
            customer-supplied webhook data, and is therefore read-only via this API.
          example: U1234567890abcdef1234567890abcdef
          maxLength: 50
          type: string
        phone:
          description: |-
            Bounded to the leads.phone column width (varchar(50)). Since the webhook
            now accepts unparseable numbers (kept raw and tagged for review), an
            oversized value would otherwise reach the DB write and 500; cap it here.
          maxLength: 50
          type: string
        source:
          type: string
        tags:
          items:
            type: string
          type: array
        timezone:
          type: string
        user_assignments:
          $ref: '#/components/schemas/models.UserAssignmentRequest'
      required:
        - name
      type: object
    models.UserAssignmentRequest:
      properties:
        assign:
          items:
            type: integer
          type: array
        replace:
          items:
            type: integer
          type: array
        unassign:
          items:
            type: integer
          type: array
      type: object
    models.WebhookConfigurationResponse:
      properties:
        active:
          type: boolean
        company_id:
          type: integer
        created_at:
          type: string
        event_types: {}
        headers: {}
        id:
          type: integer
        last_delivery_at:
          type: string
        last_delivery_error:
          type: string
        max_concurrency:
          type: integer
        max_retries:
          type: integer
        secret:
          type: string
        updated_at:
          type: string
        url:
          type: string
      type: object
    transformers.ConversationAttachmentPublic:
      properties:
        content_type:
          type: string
        download_url:
          type: string
        file_name:
          type: string
        id:
          type: integer
      type: object
    transformers.ConversationsPublicResponse:
      properties:
        attachments:
          items:
            $ref: '#/components/schemas/transformers.ConversationAttachmentPublic'
          type: array
        content:
          type: string
        created_at:
          type: string
        id:
          type: integer
        sent_by:
          $ref: '#/components/schemas/transformers.PublicSentByType'
      type: object
    transformers.PublicSentByType:
      enum:
        - lead
        - agent
      type: string
      x-enum-varnames:
        - PublicSentByTypeLead
        - PublicSentByTypeAgent
    webhook_subscriptions.CreateWebhookSubscriptionBinding:
      properties:
        description:
          type: string
        event_type:
          type: string
        headers:
          additionalProperties:
            type: string
          type: object
        url:
          type: string
      required:
        - event_type
        - url
      type: object
    webhook_subscriptions.UpdateWebhookSubscriptionBinding:
      properties:
        description:
          type: string
        event_type:
          type: string
        headers:
          additionalProperties:
            type: string
          type: object
        max_concurrency:
          maximum: 100
          minimum: 1
          type: integer
        max_retries:
          maximum: 20
          minimum: 0
          type: integer
        status:
          enum:
            - active
            - disabled
          type: string
        url:
          type: string
      required:
        - event_type
        - url
      type: object
