> ## 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 provider, to a destination you name, so you can find out whether its credentials work before anyone depends on them.

This is not a dry run: a real e-mail or SMS is delivered and, for SMS, may be billed by the carrier.

The two failure modes are deliberately distinguishable, because they call for opposite actions:
- `422 IDE-1016` — the provider REJECTED the credentials. Fatal: fix the configuration.
- `400 IDE-1017` — the credentials were accepted but the message was not delivered. The configuration may be perfectly fine — a trial account that refuses unverified recipients answers exactly this.

Other failures:
- `404` — no such provider in your organization.
- `503 IDE-0066` — the identity provider is unavailable (unreachable, too slow to answer, or failing). Nothing about the request was wrong; retry it later.



## OpenAPI

````yaml /en/openapi/v3-current/AM-identity.yaml post /v1/providers/{id}/test-send
openapi: 3.1.0
info:
  contact:
    name: Lerian Studio
    url: https://lerian.studio
  description: OpenAPI 3.1 surface for the Access Manager identity component.
  license:
    name: Lerian Studio General License
  title: Plugin Access Manager — Identity API
  version: v1
servers:
  - url: https://identity.sandbox.lerian.net
security: []
tags:
  - description: >-
      M2M-only: each plugin declares its own permissions, roles and M2M
      contract, and the server reconciles them.
    name: Declarations
  - description: >-
      A tenant administrator's customers. Each partner holds what its
      credentials may DO (permissions, per product) and WHERE they may do it
      (scope, per product and dimension); an M2M application attached to one is
      confined to that intersection. Administrator-only: authorized on the
      "partners" resource, and every route resolves the owning organization from
      the caller's token.
    name: Partners
paths:
  /v1/providers/{id}/test-send:
    post:
      tags:
        - Providers
      summary: Test send through a Provider
      description: >-
        Sends ONE REAL message through a stored provider, to a destination you
        name, so you can find out whether its credentials work before anyone
        depends on them.


        This is not a dry run: a real e-mail or SMS is delivered and, for SMS,
        may be billed by the carrier.


        The two failure modes are deliberately distinguishable, because they
        call for opposite actions:

        - `422 IDE-1016` — the provider REJECTED the credentials. Fatal: fix the
        configuration.

        - `400 IDE-1017` — the credentials were accepted but the message was not
        delivered. The configuration may be perfectly fine — a trial account
        that refuses unverified recipients answers exactly this.


        Other failures:

        - `404` — no such provider in your organization.

        - `503 IDE-0066` — the identity provider is unavailable (unreachable,
        too slow to answer, or failing). Nothing about the request was wrong;
        retry it later.
      operationId: testSendProvider
      parameters:
        - description: Provider ID.
          in: path
          name: id
          required: true
          schema:
            description: Provider ID.
            examples:
              - smtp-primary
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProviderTestSendInput'
              description: Where to send the single test message.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderTestSendResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Service Unavailable
      security:
        - BearerAuth: []
components:
  schemas:
    ProviderTestSendInput:
      additionalProperties: false
      properties:
        email:
          type: string
        phone:
          type: string
      type: object
    ProviderTestSendResponse:
      additionalProperties: false
      properties:
        category:
          enum:
            - Email
            - SMS
          examples:
            - SMS
          type: string
        delivered:
          examples:
            - true
          type: boolean
        providerId:
          examples:
            - 00000000-0000-0000-0000-000000000000
          type: string
      type: object
    HTTPError:
      additionalProperties: false
      properties:
        code:
          type: string
        entityType:
          type: string
        err: {}
        message:
          type: string
        title:
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.