TagoIO Profile API

Manage your own profile settings (Profile Token).

OpenAPI Specification

tago-io-profile-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: TagoIO Access Management Profile API
  description: "#### **How to use this documentation**\nThe documentation is split by which token you're required to use in the request.  \nTagoIO provides 4 different tokens:\n- **Device-Token**: The token from your device, which you can get from the device's page.\n    \n- **Profile-Token**: Also know as Account-Token. You get from your profile settings page.\n    \n- **Network-Token**: Is the token from your Network. Only available if you're owner of the network in your integrations page.\n    \n- **Analysis-Token:** The token from your analysis, available in the analysis page.\n---\n#### Setting the API Endpoint Region\nWhen making a request to the TagoIO API, you must also specify the appropriate regional endpoint. Choose one of the following endpoints based on your geographical region:\n\n- **United States East 1:**  \n    Use this endpoint when your application is based in the eastern United States.  \n    **URL:** `https://api.us-e1.tago.io/`\n    \n- **Europe West 1:**  \n    Use this endpoint when your application is based in Western Europe.  \n    **URL:** `https://api.eu-w1.tago.io/`\n\n- **Tago Deploy:**  \n  You should use your own API URL that is available in your Domains section of the TagoDeploy."
  version: 1.0.0
  contact: {}
servers:
- url: https://api.us-e1.tago.io
- url: https://api.eu-w1.tago.io
security:
- ProfileToken: []
tags:
- name: Profile
  description: Manage your own profile settings (Profile Token).
paths:
  /profiled/{id}/statistics:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
        example: Type a Profile ID
      description: Can be found in the profile's information tab "More"
    get:
      tags:
      - Profile
      summary: Profile Statistics
      description: Get your Profile Statistics
      operationId: getAProfileStatistics
      parameters:
      - name: date
        in: query
        schema:
          type: string
          example: YYYY-MM-DD
        description: Filter the statistics by specific date
      - name: timezone
        in: query
        schema:
          type: string
          example: Your account's timezone
        description: Filter the statiscs with the timezone applied if not it returns the UTC time
      responses:
        '200':
          description: Getting a profile statistics
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: array
                    items:
                      type: object
                      properties:
                        data_records:
                          type: number
                          example: 151611
                        file_storage:
                          type: number
                          example: 49.89
                        input:
                          type: number
                          example: 39933
                        output:
                          type: number
                          example: 1272
                        time:
                          type: string
                          example: '2023-11-08T04:01:36.124Z'
                    example:
                    - data_records: 151611
                      file_storage: 49.89
                      input: 39933
                      output: 1272
                      time: '2023-11-08T04:01:36.124Z'
                    - data_records: 151691
                      file_storage: 49.89
                      input: 40165
                      output: 1272
                      time: '2023-11-08T05:01:35.986Z'
                    - data_records: 151863
                      file_storage: 49.89
                      input: 40397
                      output: 1272
                      time: '2023-11-08T06:01:35.963Z'
                    - data_records: 152389
                      file_storage: 49.89
                      input: 40629
                      output: 1272
                      time: '2023-11-08T07:01:36.021Z'
                    - data_records: 152497
                      file_storage: 49.89
                      input: 40861
                      output: 1272
                      time: '2023-11-08T08:01:36.019Z'
                    - data_records: 152609
                      file_storage: 49.89
                      input: 41093
                      output: 1272
                      time: '2023-11-08T09:01:35.908Z'
                    - data_records: 152981
                      file_storage: 49.89
                      input: 41325
                      output: 1272
                      time: '2023-11-08T10:01:36.052Z'
                    - data_records: 153105
                      file_storage: 49.89
                      input: 41566
                      output: 1272
                      time: '2023-11-08T11:01:36.155Z'
                    - data_records: 153373
                      file_storage: 49.89
                      input: 41789
                      output: 1272
                      time: '2023-11-08T12:01:35.906Z'
                    - data_records: 153517
                      file_storage: 49.89
                      input: 42030
                      output: 1272
                      time: '2023-11-08T13:01:35.873Z'
                    - data_records: 150262
                      file_storage: 49.89
                      input: 42253
                      output: 1272
                      time: '2023-11-08T14:01:35.967Z'
                    - data_records: 150422
                      file_storage: 49.89
                      input: 42485
                      output: 1272
                      time: '2023-11-08T15:01:35.992Z'
                    - data_records: 150422
                      file_storage: 49.89
                      input: 42717
                      output: 1272
                      time: '2023-11-08T16:01:35.825Z'
                    - data_records: 151054
                      file_storage: 49.89
                      input: 42949
                      output: 1272
                      time: '2023-11-08T17:01:35.903Z'
                    - data_records: 151242
                      file_storage: 49.89
                      input: 43181
                      output: 1272
                      time: '2023-11-08T18:01:35.995Z'
                    - data_records: 151242
                      file_storage: 49.89
                      input: 43413
                      output: 1272
                      time: '2023-11-08T19:01:35.946Z'
                  status:
                    type: boolean
                    example: true
              examples:
                Getting a profile statistics:
                  value:
                    result:
                    - data_records: 151611
                      file_storage: 49.89
                      input: 39933
                      output: 1272
                      time: '2023-11-08T04:01:36.124Z'
                    - data_records: 151691
                      file_storage: 49.89
                      input: 40165
                      output: 1272
                      time: '2023-11-08T05:01:35.986Z'
                    - data_records: 151863
                      file_storage: 49.89
                      input: 40397
                      output: 1272
                      time: '2023-11-08T06:01:35.963Z'
                    - data_records: 152389
                      file_storage: 49.89
                      input: 40629
                      output: 1272
                      time: '2023-11-08T07:01:36.021Z'
                    - data_records: 152497
                      file_storage: 49.89
                      input: 40861
                      output: 1272
                      time: '2023-11-08T08:01:36.019Z'
                    - data_records: 152609
                      file_storage: 49.89
                      input: 41093
                      output: 1272
                      time: '2023-11-08T09:01:35.908Z'
                    - data_records: 152981
                      file_storage: 49.89
                      input: 41325
                      output: 1272
                      time: '2023-11-08T10:01:36.052Z'
                    - data_records: 153105
                      file_storage: 49.89
                      input: 41566
                      output: 1272
                      time: '2023-11-08T11:01:36.155Z'
                    - data_records: 153373
                      file_storage: 49.89
                      input: 41789
                      output: 1272
                      time: '2023-11-08T12:01:35.906Z'
                    - data_records: 153517
                      file_storage: 49.89
                      input: 42030
                      output: 1272
                      time: '2023-11-08T13:01:35.873Z'
                    - data_records: 150262
                      file_storage: 49.89
                      input: 42253
                      output: 1272
                      time: '2023-11-08T14:01:35.967Z'
                    - data_records: 150422
                      file_storage: 49.89
                      input: 42485
                      output: 1272
                      time: '2023-11-08T15:01:35.992Z'
                    - data_records: 150422
                      file_storage: 49.89
                      input: 42717
                      output: 1272
                      time: '2023-11-08T16:01:35.825Z'
                    - data_records: 151054
                      file_storage: 49.89
                      input: 42949
                      output: 1272
                      time: '2023-11-08T17:01:35.903Z'
                    - data_records: 151242
                      file_storage: 49.89
                      input: 43181
                      output: 1272
                      time: '2023-11-08T18:01:35.995Z'
                    - data_records: 151242
                      file_storage: 49.89
                      input: 43413
                      output: 1272
                      time: '2023-11-08T19:01:35.946Z'
                    status: true
  /profile/{id}/summary:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
        example: Type a profile ID
      description: Can be found in the profile's information tab "More"
    get:
      tags:
      - Profile
      summary: Profile Summary
      description: Get your Profile Summary
      operationId: getAProfileSummary
      responses:
        '200':
          description: Get a general summary of your profile resources
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      addons:
                        type: object
                        properties:
                          control_tower:
                            type: boolean
                            example: true
                          custom_dns:
                            type: boolean
                            example: false
                          mobile:
                            type: boolean
                            example: false
                          profile:
                            type: string
                            example: 61fac4d9a5c9f40012a5ff92
                          updated_at:
                            type: string
                            example: '2023-09-06T13:47:08.192Z'
                      amount:
                        type: object
                        properties:
                          action:
                            type: number
                            example: 37
                          am:
                            type: number
                            example: 5
                          analysis:
                            type: number
                            example: 18
                          connectors:
                            type: number
                            example: 32
                          dashboard:
                            type: number
                            example: 231
                          device:
                            type: number
                            example: 79
                          dictionary:
                            type: number
                            example: 7
                          networks:
                            type: number
                            example: 9
                          run_users:
                            type: number
                            example: 5
                          tcore:
                            type: number
                            example: 2
                          tcore_cluster:
                            type: number
                            example: 2
                      limit:
                        type: object
                        properties:
                          analysis:
                            type: number
                            example: 5
                          data_records:
                            type: number
                            example: 250000
                          email:
                            type: number
                            example: 10
                          file_storage:
                            type: number
                            example: 132
                          input:
                            type: number
                            example: 350000
                          output:
                            type: number
                            example: 342153
                          push_notification:
                            type: number
                            example: 58
                          run_users:
                            type: number
                            example: 5
                          sms:
                            type: number
                            example: 60
                          tcore:
                            type: number
                            example: 1
                      limit_used:
                        type: object
                        properties:
                          analysis:
                            type: number
                            example: 0
                          dashboard_output:
                            type: number
                            example: 65
                          data_records:
                            type: number
                            example: 151242
                          email:
                            type: number
                            example: 0
                          file_storage:
                            type: number
                            example: 49.89
                          input:
                            type: number
                            example: 43463
                          output:
                            type: number
                            example: 1272
                          push_notification:
                            type: number
                            example: 0
                          run_users:
                            type: number
                            example: 5
                          sms:
                            type: number
                            example: 0
                          tcore:
                            type: number
                            example: 3
                          tcore_cluster:
                            type: number
                            example: 2
                      tago_run:
                        type: string
                        example: johndoee.tago.run
                  status:
                    type: boolean
                    example: true
              examples:
                Getting a profile summary:
                  value:
                    result:
                      addons:
                        control_tower: true
                        custom_dns: false
                        mobile: false
                        profile: 61fac4d9a5c9f40012a5ff92
                        updated_at: '2023-09-06T13:47:08.192Z'
                      amount:
                        action: 37
                        am: 5
                        analysis: 18
                        connectors: 32
                        dashboard: 231
                        device: 79
                        dictionary: 7
                        networks: 9
                        run_users: 5
                        tcore: 2
                        tcore_cluster: 2
                      limit:
                        analysis: 5
                        data_records: 250000
                        email: 10
                        file_storage: 132
                        input: 350000
                        output: 342153
                        push_notification: 58
                        run_users: 5
                        sms: 60
                        tcore: 1
                      limit_used:
                        analysis: 0
                        dashboard_output: 65
                        data_records: 151242
                        email: 0
                        file_storage: 49.89
                        input: 43463
                        output: 1272
                        push_notification: 0
                        run_users: 5
                        sms: 0
                        tcore: 3
                        tcore_cluster: 2
                      tago_run: johndoee.tago.run
                    status: true
  /profile/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
        example: Type a profile ID
      description: Can be found in the profile's information tab "More"
    get:
      tags:
      - Profile
      summary: Profile Information
      description: Get your profile settings
      operationId: getAProfileDetails
      responses:
        '200':
          description: Get a Profile Details
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      account_plan:
                        type: string
                        example: starter
                      addons:
                        type: object
                        properties:
                          control_tower:
                            type: boolean
                            example: true
                          custom_dns:
                            type: boolean
                            example: false
                          mobile:
                            type: boolean
                            example: false
                          profile:
                            type: string
                            example: 61fac4d9a5c9f40012a5ff92
                          updated_at:
                            type: string
                            example: '2023-09-06T13:47:08.192Z'
                      allocation:
                        type: object
                        properties:
                          analysis:
                            type: number
                            example: 5
                          data_records:
                            type: number
                            example: 250000
                          email:
                            type: number
                            example: 10
                          file_storage:
                            type: number
                            example: 132
                          input:
                            type: number
                            example: 350000
                          output:
                            type: number
                            example: 342153
                          push_notification:
                            type: number
                            example: 58
                          run_users:
                            type: number
                            example: 5
                          sms:
                            type: number
                            example: 60
                      info:
                        type: object
                        properties:
                          account:
                            type: string
                            example: 612ea05e3cc07800127153892
                          banner_url:
                            example: null
                          created_at:
                            type: string
                            example: '2022-02-02T16:44:09.134Z'
                          id:
                            type: string
                            example: 61fac4d9a5c9f40012a5ff92
                          logo_url:
                            type: string
                            example: ''
                          name:
                            type: string
                            example: Test Profile
                          region:
                            type: string
                            example: us-1
                          rpm:
                            type: object
                            properties:
                              data_input:
                                type: number
                                example: 98283293
                              data_output:
                                type: number
                                example: 10
                          updated_at:
                            type: string
                            example: '2023-10-13T11:54:20.081Z'
                  status:
                    type: boolean
                    example: true
  /profile/{id}/service:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
        example: 61fac4d9a5c9f40012a5ff92
      description: The ID of the profile
    put:
      tags:
      - Profile
      summary: Configure Service Provider
      description: 'Configure external service providers for your profile. This allows you to set up integrations with third-party services for SMS and Email messaging.


        **Available service providers:**


        | Service Type | Provider | Description |

        |--------------|----------|-------------|

        | `sms` | Twilio | Send SMS messages via Twilio |

        | `sms` | SNS | Send SMS messages via Amazon SNS |

        | `email` | SendGrid | Send emails via SendGrid API |

        | `email` | SES | Send emails via Amazon SES |

        | `email` | SMTP | Send emails via custom SMTP server |


        **Important notes:**

        - Credentials are securely stored using [TagoIO Secrets](/docs/tagoio/getting-started/secrets). You must create the appropriate secrets before configuring a service provider.

        - Each service type can only have one active provider configuration at a time

        - Use the test endpoint to verify your configuration before using it in production


        **Required secrets by provider:**

        - **Twilio SMS**: Create two Text secrets containing your Twilio SID and Auth Token

        - **SNS SMS**: Create an AWS SQS Secret with your AWS credentials (region, access key, secret key)

        - **SendGrid Email**: Create a Text secret containing your SendGrid API Key

        - **SES Email**: Create an AWS SQS Secret with your AWS credentials (region, access key, secret key)

        - **SMTP Email**: Create an SMTP Secret with your server configuration

        '
      operationId: configureProfileService
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: object
                  description: Email service configuration
                  properties:
                    provider:
                      type: string
                      enum:
                      - sendgrid
                      - ses
                      - smtp
                      description: The email provider to use
                      example: smtp
                    from:
                      type: string
                      description: Sender email address
                      example: noreply@example.com
                    secrets:
                      type: object
                      description: Secret IDs for provider credentials
                      properties:
                        data:
                          type: string
                          description: Secret ID containing SMTP configuration (required for SMTP provider) or AWS SQS Secret (required for SES provider)
                          example: 68c9977a28079e0010aaf399
                        api_key:
                          type: string
                          description: Secret ID containing SendGrid API Key (required for SendGrid provider)
                          example: 68c9977a28079e0010aaf399
                sms:
                  type: object
                  description: SMS service configuration
                  properties:
                    provider:
                      type: string
                      enum:
                      - twilio
                      - sns
                      description: The SMS provider to use
                      example: twilio
                    from:
                      type: string
                      description: Sender phone number in E.164 format (required for Twilio, optional for SNS)
                      example: '+15551234567'
                    secrets:
                      type: object
                      description: Secret IDs for provider credentials
                      properties:
                        twilio_sid:
                          type: string
                          description: Secret ID containing Twilio Account SID (required for Twilio provider)
                          example: 674f1740f9ccd2000aaa4551
                        twilio_token:
                          type: string
                          description: Secret ID containing Twilio Auth Token (required for Twilio provider)
                          example: 674f1736f9ccd2000aaa4550
                        data:
                          type: string
                          description: Secret ID containing AWS SQS Secret (required for SNS provider)
                          example: 68c9977a28079e0010aaf399
            examples:
              Configure SMS and Email:
                value:
                  email:
                    provider: smtp
                    from: noreply@example.com
                    secrets:
                      data: 68c9977a28079e0010aaf399
                  sms:
                    provider: twilio
                    from: '+15551234567'
                    secrets:
                      twilio_sid: 674f1740f9ccd2000aaa4551
                      twilio_token: 674f1736f9ccd2000aaa4550
              Configure SMS only:
                value:
                  sms:
                    provider: twilio
                    from: '+15551234567'
                    secrets:
                      twilio_sid: 674f1740f9ccd2000aaa4551
                      twilio_token: 674f1736f9ccd2000aaa4550
              Configure Email with SendGrid:
                value:
                  email:
                    provider: sendgrid
                    from: noreply@example.com
                    secrets:
                      api_key: 68c9977a28079e0010aaf399
              Configure Email with SMTP:
                value:
                  email:
                    provider: smtp
                    from: noreply@example.com
                    secrets:
                      data: 68c9977a28079e0010aaf399
              Configure Email with SES:
                value:
                  email:
                    provider: ses
                    from: noreply@example.com
                    secrets:
                      data: 68c9977a28079e0010aaf399
              Configure SMS with SNS:
                value:
                  sms:
                    provider: sns
                    secrets:
                      data: 68c9977a28079e0010aaf399
      responses:
        '200':
          description: Service provider configured successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    example: Service provider configured successfully
                  status:
                    type: boolean
                    example: true
        '400':
          description: Bad request - Invalid configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Invalid credentials format for the selected provider
        '401':
          description: Unauthorized - Invalid or missing token
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Unauthorized
        '403':
          description: Forbidden - Insufficient permissions
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: You do not have permission to configure services for this profile
  /profile/{id}/service/test/{service_type}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
        example: 61fac4d9a5c9f40012a5ff92
      description: The ID of the profile
    - name: service_type
      in: path
      required: true
      schema:
        type: string
        enum:
        - sms
        - email
        example: sms
      description: The type of service to test (sms or email)
    post:
      tags:
      - Profile
      summary: Test Service Provider
      description: 'Test a configured service provider by sending a test message. This helps verify that your service provider configuration is working correctly before using it in production.


        **Supported service types:**

        - `sms` - Sends a test SMS message to the specified phone number

        - `email` - Sends a test email to the specified email address


        **Important notes:**

        - A service provider must be configured before testing

        - Test messages will consume your provider''s quota/credits

        - For SMS, ensure the recipient number is in E.164 format (e.g., +15551234567)

        '
      operationId: testProfileService
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - to
              properties:
                to:
                  type: string
                  description: 'The recipient address for the test message.

                    - For SMS: Phone number in E.164 format (e.g., +15551234567)

                    - For Email: Email address (e.g., user@example.com)

                    '
                  example: '+15559876543'
                message:
                  type: string
                  description: Custom test message content (optional). If not provided, a default test message will be sent.
                  example: This is a test message from TagoIO
                subject:
                  type: string
                  description: Email subject line (only for email service type, optional)
       

# --- truncated at 32 KB (39 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/tago-io/refs/heads/main/openapi/tago-io-profile-api-openapi.yml