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

# Send a location to a conversation

> Sends a map pin. An empty body sends the clinic's location from Clinic Information, named
after the clinic. A channel that cannot send locations (`can_send_location: false` in
`GET /channels/capabilities`) answers `LOCATION_NOT_SUPPORTED`; a clinic without a location
answers `CLINIC_LOCATION_MISSING`.



## OpenAPI

````yaml post /v1/conversations/{id}/messages/location
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: >-
    Flextell REST API referansı. Kimlik doğrulama, scope ve istek kuralları için
    API sekmesindeki rehberlere bakın.
servers:
  - url: https://app.flextell.ai/api
    description: Üretim
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/conversations/{id}/messages/location:
    post:
      tags:
        - Conversation
      summary: Send a location to a conversation
      description: >-
        Sends a map pin. An empty body sends the clinic's location from Clinic
        Information, named

        after the clinic. A channel that cannot send locations
        (`can_send_location: false` in

        `GET /channels/capabilities`) answers `LOCATION_NOT_SUPPORTED`; a clinic
        without a location

        answers `CLINIC_LOCATION_MISSING`.
      operationId: conversation.sendLocationMessage
      parameters:
        - name: id
          in: path
          required: true
          description: The conversation identifier
          schema:
            type: integer
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConversationSendLocationRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '409':
          $ref: '#/components/responses/CustomerErasedException'
        '422':
          $ref: '#/components/responses/ValidationException'
        '428':
          description: >-
            Mandatory setup is incomplete. Finish the setup wizard first;
            `data.next_step` names the step to continue with.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    examples:
                      - false
                  error_code:
                    type: string
                    enum:
                      - SETUP_REQUIRED
                    examples:
                      - SETUP_REQUIRED
                  message:
                    type: string
                    examples:
                      - Complete the required setup steps to continue.
                  data:
                    type: object
                    properties:
                      next_step:
                        type:
                          - string
                          - 'null'
                        examples:
                          - clinic_info
                    required:
                      - next_step
                required:
                  - success
                  - error_code
                  - message
                  - data
components:
  schemas:
    ConversationSendLocationRequest:
      type: object
      properties:
        latitude:
          type:
            - number
            - 'null'
          description: >-
            Latitude of the point to send. Omit it together with `longitude` to
            send the clinic's location from Clinic Information.
          minimum: -90
          maximum: 90
        longitude:
          type:
            - number
            - 'null'
          description: Longitude of the point to send.
          minimum: -180
          maximum: 180
        name:
          type:
            - string
            - 'null'
          description: >-
            Place name shown on the pin. Defaults to the clinic's name when the
            clinic's location is sent.
          maxLength: 255
        address:
          type:
            - string
            - 'null'
          description: >-
            Address shown on the pin. Defaults to the clinic's address when the
            clinic's location is sent.
          maxLength: 500
      title: ConversationSendLocationRequest
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    CustomerErasedException:
      description: The patient record has been erased and is read-only
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                description: Always false for an error.
                examples:
                  - false
              error_code:
                type: string
                description: Machine-readable error code.
                examples:
                  - CUSTOMER_ERASED
              message:
                type: string
                description: Localized error message.
            required:
              - success
              - error_code
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.flextell.ai/oauth/authorize
          tokenUrl: https://app.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````

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