> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Test send through a Provider

> Sends one real message through a stored Email or SMS Provider to validate its credentials. Two failure outcomes are distinguished: 422 IDE-1016 means the provider rejected the credentials (fatal — fix them); 400 IDE-1017 means the message was not delivered but no credential failure was reported, which is what a Twilio trial account returns for an unverified recipient even with valid credentials. Both outcomes append the upstream provider's own reason to the response message, with the recipient and any other address or phone number removed. A 500 means the send never reached the provider at all and says nothing about its configuration. Not supported for OAuth providers (422 IDE-1018).



## OpenAPI

````yaml /es/openapi/v3-current/AM-identity.yaml post /v1/providers/{id}/test-send
openapi: 3.0.1
info:
  contact: {}
  description: This is a swagger documentation for the Identity API
  termsOfService: http://swagger.io/terms/
  title: Identity API
  version: 1.0.0
servers:
  - url: //localhost:4001/
security: []
paths:
  /v1/providers/{id}/test-send:
    post:
      tags:
        - Providers
      summary: Test send through a Provider
      description: >-
        Sends one real message through a stored Email or SMS Provider to
        validate its credentials. Two failure outcomes are distinguished: 422
        IDE-1016 means the provider rejected the credentials (fatal — fix them);
        400 IDE-1017 means the message was not delivered but no credential
        failure was reported, which is what a Twilio trial account returns for
        an unverified recipient even with valid credentials. Both outcomes
        append the upstream provider's own reason to the response message, with
        the recipient and any other address or phone number removed. A 500 means
        the send never reached the provider at all and says nothing about its
        configuration. Not supported for OAuth providers (422 IDE-1018).
      parameters:
        - description: Provider ID
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProviderTestSendInput'
        description: >-
          Destination (email for an Email provider, E.164 phone for an SMS
          provider)
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderTestSendResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg.HTTPError'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg.HTTPError'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg.HTTPError'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg.HTTPError'
          description: Internal Server Error
      security:
        - BearerAuth: []
components:
  schemas:
    ProviderTestSendInput:
      description: ProviderTestSendInput payload
      example:
        phone: phone
        email: email
      properties:
        email:
          description: >-
            Email is the recipient address, required for a Category=Email
            provider.
          type: string
        phone:
          description: >-
            Phone is the recipient number in E.164 form (for example
            +5511999999999),

            required for a Category=SMS provider. `e164` is a built-in tag of
            the

            vendored go-playground/validator v9.31.0.
          type: string
      type: object
    ProviderTestSendResponse:
      description: ProviderTestSendResponse payload
      example:
        providerId: 00000000-0000-0000-0000-000000000000
        delivered: true
        category: SMS
      properties:
        category:
          example: SMS
          type: string
        delivered:
          description: >-
            Delivered reports that the provider ACCEPTED the message for
            delivery.

            Upstream acceptance is not proof of receipt — no provider confirms
            that

            synchronously — so this is the strongest signal a probe can carry.
          example: true
          type: boolean
        providerId:
          example: 00000000-0000-0000-0000-000000000000
          type: string
      type: object
    pkg.HTTPError:
      properties:
        code:
          type: string
        entityType:
          type: string
        err:
          type: object
        message:
          type: string
        title:
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      description: 'Bearer authentication. Send Authorization: Bearer <token>.'
      in: header
      name: Authorization
      type: apiKey

````