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

# Envoyer un SMS (France)

> Send an SMS message to a French phone number using a verified Sender ID. The Sender ID must be verified by the Allo team before use. Contact support to register your Sender ID.

<Info>
  Pour envoyer des SMS en France, vous avez besoin d'un Sender ID verifie. Configurez votre Sender ID depuis [Parametres > Conformite](https://web.withallo.com/settings/compliance).
</Info>

<Accordion title="Pourquoi un Sender ID verifie est necessaire">
  **Les operateurs francais bloquent les SMS envoyes depuis des numeros mobiles standards** (`+33 6xx` / `+33 7xx`) via API. Vous devez utiliser un Sender ID alphanumerique ou un numero court (Short Code) pour envoyer des SMS professionnels en France.

  ## Pourquoi les numeros mobiles standards ne fonctionnent pas

  Les operateurs francais (Orange, SFR, Bouygues Telecom, Free Mobile) interdisent l'utilisation de numeros mobiles pour les SMS professionnels. L'ARCEP — le regulateur des telecoms en France — a formalise cette interdiction en janvier 2023.

  Si vous essayez d'envoyer un SMS depuis un numero `+33 6` ou `+33 7` via API, les operateurs bloquent le message au niveau du reseau. Les numeros qui depassent les seuils de volume sont automatiquement suspendus.

  Allo propose deux alternatives conformes : **Sender ID alphanumerique** et **Short Code**.

  ***

  ## Vos options

  ### Sender ID alphanumerique

  Votre SMS affiche un nom textuel personnalise (jusqu'a 11 caracteres) au lieu d'un numero de telephone. Par exemple, vos destinataires voient "MOBILEFIRST" au lieu de `+33 6 12 34 56 78`.

  **Ideal pour :**
  Les rappels de rendez-vous, confirmations de commande, notifications de paiement et campagnes marketing unidirectionnelles.

  **Regles de formatage :**

  * 3 a 11 caracteres
  * Lettres (A-Z, a-z) et chiffres (0-9) uniquement
  * Doit contenir au moins une lettre
  * Pas d'espaces ni de caracteres speciaux

  **Limitation principale :**
  Les destinataires ne peuvent pas repondre.

  **Delai de mise en place :** 1 a 5 jours ouvrables.

  ### Short Code (numero a 5 chiffres)

  Un numero dedie ou partage a 5 chiffres (ex. `36xxx` pour le marketing, `38xxx` pour les messages transactionnels).

  **Ideal pour :**
  Les conversations bidirectionnelles, le service client, les campagnes par mots-cles et le marketing a haut volume avec gestion native du STOP.

  **Avantage principal :**
  Les destinataires peuvent repondre.

  **Delai de mise en place :** 2 a 4 mois pour un code dedie. Quelques jours a quelques semaines pour un code partage.

  <Tip>
    La plupart des petites entreprises commencent avec un Sender ID alphanumerique. Ajoutez un Short Code plus tard si vous avez besoin de messagerie bidirectionnelle.
  </Tip>

  ***

  ## Regles de conformite SMS en France

  **Consentement :**

  * **B2C :** Consentement explicite (opt-in) requis.
  * **B2B :** Pas de consentement prealable requis, mais le message doit etre en lien avec l'activite professionnelle du destinataire.

  **Restrictions horaires (SMS marketing uniquement) :**

  * Pas de SMS marketing le dimanche ni les jours feries francais
  * Pas de SMS marketing entre 20h00 et 08h00

  **Mecanisme STOP :**
  Chaque SMS marketing doit inclure des instructions de desabonnement.
</Accordion>


## OpenAPI

````yaml POST /v1/api/sms#france
openapi: 3.0.3
info:
  title: Allo API
  description: >-
    Allo API provides programmatic access to your Allo account, allowing you to
    manage webhooks, retrieve calls and contacts, and send SMS messages.


    All requests to `/v1/api/**` endpoints automatically go through quota
    checking and scope validation.
  version: 1.0.0
  contact:
    name: Allo Support
servers:
  - url: https://api.withallo.com
    description: Production server
security: []
tags:
  - name: Summary Templates
    description: >-
      Manage call summary templates that control how AI-generated call summaries
      are structured for your team.
  - name: Webhooks
    description: >-
      Manage webhook endpoints to receive real-time notifications about events
      in your Allo account. Each endpoint subscribes to one or more event topics
      and is verified with a signing secret.
  - name: Calls
    description: >-
      Retrieve and search call records with filtering and pagination. Filter
      calls by your Allo phone number.
  - name: Contacts
    description: >-
      Search and retrieve contact information with sorting and pagination.
      Includes engagement level tracking.
  - name: SMS
    description: Send SMS messages to phone numbers using your Allo numbers.
  - name: Phone Numbers
    description: Retrieve information about your Allo phone numbers.
  - name: Analytics
    description: Pre-computed call metrics, team performance, and outbound dial funnel
  - name: CRM
    description: Manage people, companies, and deals in your CRM.
  - name: Notes
    description: >-
      Internal team notes on conversations and CRM people, with @mention
      support. Notes are never visible to the contact.
  - name: Threads
    description: >-
      Team discussion threads attached to a conversation item (call, SMS, or
      conversation note). One thread per item.
paths:
  /v1/api/sms#france:
    post:
      tags:
        - SMS
      summary: Send SMS (France)
      description: >-
        Send an SMS message to a French phone number using a verified Sender ID.
        The Sender ID must be verified by the Allo team before use. Contact
        support to register your Sender ID.
      operationId: sendSMSFrance
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendSMSFranceRequest'
            example:
              sender_id: MyCompany
              to: '+33612345678'
              message: Bonjour, ceci est un message de test
      responses:
        '200':
          description: SMS sent successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendSMSResponse'
              example:
                data:
                  from_number: null
                  sender_id: MyCompany
                  to_number: '+33612345678'
                  type: OUTBOUND
                  content: Bonjour, ceci est un message de test
                  start_date: '2024-01-15T10:30:00'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidSenderId:
                  summary: Invalid Sender ID
                  value:
                    code: INVALID_SENDER_ID
                    details: null
                senderIdNotActive:
                  summary: Sender ID not active
                  value:
                    code: SENDER_ID_NOT_ACTIVE
                    details: null
                invalidToNumber:
                  summary: Invalid to number
                  value:
                    code: INVALID_TO_NUMBER
                    details: null
                invalidLength:
                  summary: Invalid message length
                  value:
                    code: INVALID_LENGTH
                    details: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - SmsAuth: []
components:
  schemas:
    SendSMSFranceRequest:
      type: object
      description: >-
        Request body for sending an SMS message in France using a verified
        Sender ID
      required:
        - sender_id
        - to
        - message
      properties:
        sender_id:
          type: string
          description: >-
            Your verified Sender ID (must be verified by the Allo team). This is
            an alphanumeric identifier that will appear as the sender of the
            SMS.
          example: MyCompany
        to:
          type: string
          description: Recipient phone number in France (E.164 format, must start with +33)
          example: '+33612345678'
        message:
          type: string
          description: Message content
          minLength: 1
          maxLength: 1000
          example: Bonjour, ceci est un message de test
    SendSMSResponse:
      type: object
      description: Standard response wrapper for sent SMS
      properties:
        data:
          $ref: '#/components/schemas/TextMessageApiResponse'
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code identifying the type of error
        details:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ErrorDetail'
          description: Additional error details, or null if not applicable
    TextMessageApiResponse:
      type: object
      description: Sent SMS message details
      properties:
        from_number:
          type: string
          nullable: true
          description: >-
            Phone number that sent the message. Null when sender_id is used
            instead.
          example: '+1234567890'
        sender_id:
          type: string
          nullable: true
          description: >-
            Sender ID used for the message (alphanumeric identifier). Only
            populated when sending with a verified Sender ID (e.g., for France
            SMS). Null when from_number is used.
          example: MyCompany
        to_number:
          type: string
          description: Phone number that received the message
          example: '+0987654321'
        type:
          type: string
          enum:
            - OUTBOUND
          description: Direction of the message (always OUTBOUND for sent messages)
        content:
          type: string
          description: Content of the SMS message
          example: Hello, this is a test message
        start_date:
          type: string
          format: date-time
          description: When the message was sent
          example: '2024-01-15T10:30:00'
    ErrorDetail:
      type: object
      properties:
        message:
          type: string
        field:
          type: string
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: API_KEY_INVALID
            details: null
    Forbidden:
      description: Forbidden - API key lacks required scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: API_KEY_INSUFFICIENT_SCOPE
            details:
              - message: required=CONTACTS_READ
                field: scope
    TooManyRequests:
      description: Too Many Requests - Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: API_KEY_QUOTA_EXCEEDED
            details:
              - message: limit=1000;type=DAILY;reset_in=3600
                field: DAILY
  securitySchemes:
    SmsAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Scope needed: `SMS_SEND`'

````