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

# Get macro details

> Returns complete details of a specific macro



## OpenAPI

````yaml /api-reference/openapi/EvoAI-CRM-Service/macros.yaml get /api/v1/macros/{id}
openapi: 3.0.4
info:
  title: Evolution Foundation - CRM Service - Macros
  description: Management of contacts, conversations, inboxes, labels and macros
  version: 1.1.0
servers:
  - url: https://api.evoai.app
    description: Production server
  - url: http://localhost:3000
    description: Development server
    variables:
      port:
        default: '3000'
  - url: '{customUrl}'
    description: Custom server
    variables:
      customUrl:
        default: https://your-instance.com
        description: Enter your server URL
security: []
paths:
  /api/v1/macros/{id}:
    parameters:
      - name: id
        in: path
        required: true
        description: Macro ID (UUID)
        schema:
          type: string
          format: uuid
    get:
      summary: Get macro details
      description: Returns complete details of a specific macro
      operationId: getMacro
      responses:
        '200':
          description: Macro retrieved successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - data
                  - meta
                  - message
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/Macro'
                  meta:
                    type: object
                    properties:
                      timestamp:
                        type: string
                        format: date-time
                        description: Response timestamp
                        example: '2024-01-15T10:30:00Z'
                  message:
                    type: string
                    description: Success message
                    example: Macro retrieved successfully
              example:
                success: true
                data:
                  id: 5d83859d-3d52-4a26-a14f-27c63c868be5
                  name: Commercial Leader
                  account_id: 37a1e39b-3579-47c2-bbb3-84829deae585
                  visibility: personal
                  actions:
                    - action_name: send_message
                      action_params:
                        - Good afternoon, how are you?
                  created_by_id: fc8ec60f-904f-4793-878d-e1534bcedee5
                  updated_by_id: fc8ec60f-904f-4793-878d-e1534bcedee5
                  created_at: '2026-01-22T19:56:36Z'
                  updated_at: '2026-01-22T19:56:36Z'
                meta:
                  timestamp: '2026-02-05T17:05:32Z'
                message: Macro retrieved successfully
        '400':
          description: Bad Request (invalid data)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                bad_request:
                  summary: Invalid request data
                  value:
                    success: false
                    error:
                      code: BAD_REQUEST
                      message: Invalid request data
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/macros/{id}
                      method: GET
        '401':
          description: Unauthorized (invalid or missing token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: Unauthorized
                  value:
                    success: false
                    error:
                      code: UNAUTHORIZED
                      message: Unauthorized
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/macros/{id}
                      method: GET
        '403':
          description: Forbidden (insufficient permissions)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                forbidden:
                  summary: Forbidden
                  value:
                    success: false
                    error:
                      code: FORBIDDEN
                      message: Forbidden
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/macros/{id}
                      method: GET
        '404':
          description: Not Found (resource not found)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                not_found:
                  summary: Macro not found
                  value:
                    success: false
                    error:
                      code: NOT_FOUND
                      message: Macro not found
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/macros/{id}
                      method: GET
        '500':
          description: Internal Server Error (server error)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal_error:
                  summary: Internal server error
                  value:
                    success: false
                    error:
                      code: INTERNAL_ERROR
                      message: An internal server error occurred
                    meta:
                      timestamp: '2024-01-15T10:30:00Z'
                      path: /api/v1/macros/{id}
                      method: GET
      security:
        - userApiKey: []
components:
  schemas:
    Macro:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique macro ID
          example: 550e8400-e29b-41d4-a716-446655440000
        name:
          type: string
          description: Macro name
          example: Resolver e agradecer cliente
        visibility:
          type: string
          description: Visibilidade da macro
          enum:
            - personal
            - global
          example: global
        actions:
          type: array
          description: List of actions that will be executed
          items:
            $ref: '#/components/schemas/MacroAction'
        files:
          type: array
          description: Files attached to the macro (for send_attachment action)
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                example: 550e8400-e29b-41d4-a716-446655440000
              macro_id:
                type: string
                format: uuid
                example: 550e8400-e29b-41d4-a716-446655440000
              file_type:
                type: string
                example: application/pdf
              file_url:
                type: string
                format: uri
                example: https://cdn.evoai.com/files/document.pdf
              blob_id:
                type: string
                format: uuid
                example: 550e8400-e29b-41d4-a716-446655440000
              filename:
                type: string
                example: document.pdf
        account_id:
          type: string
          format: uuid
          description: Account ID
          example: 123e4567-e89b-12d3-a456-426614174000
        created_by_id:
          type: string
          format: uuid
          description: ID of the user who created the macro
          nullable: true
          example: 987e6543-e21b-12d3-a456-426614174111
        updated_by_id:
          type: string
          format: uuid
          description: ID of the user who last updated the macro
          nullable: true
          example: 987e6543-e21b-12d3-a456-426614174111
        created_at:
          type: string
          format: date-time
          example: '2025-01-10T12:00:00Z'
        updated_at:
          type: string
          format: date-time
          example: '2025-01-13T14:30:00Z'
    ErrorResponse:
      type: object
      required:
        - success
        - error
        - meta
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: VALIDATION_ERROR
            message:
              type: string
              example: Validation failed
            details:
              type: object
              additionalProperties: true
              nullable: true
        meta:
          type: object
          required:
            - timestamp
            - path
            - method
          properties:
            timestamp:
              type: string
              format: date-time
              example: '2024-01-15T10:30:00Z'
            path:
              type: string
              example: /public/api/v1/inboxes/{inbox_identifier}/contacts
            method:
              type: string
              example: POST
    MacroAction:
      type: object
      required:
        - action_name
        - action_params
      properties:
        action_name:
          type: string
          description: Name of the action to be executed
          enum:
            - send_message
            - add_label
            - assign_team
            - assign_agent
            - mute_conversation
            - change_status
            - remove_label
            - remove_assigned_team
            - resolve_conversation
            - snooze_conversation
            - change_priority
            - send_email_transcript
            - send_attachment
            - add_private_note
            - send_webhook_event
          example: send_message
        action_params:
          type: array
          description: Action parameters (varies according to action type)
          items:
            oneOf:
              - type: string
              - type: integer
              - type: boolean
              - type: object
          example:
            - Obrigado por entrar em contato! Seu problema foi resolvido.
      example:
        action_name: send_message
        action_params:
          - Obrigado por entrar em contato!
  securitySchemes:
    userApiKey:
      type: apiKey
      in: header
      name: api_access_token

````

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