Attentive Offers API

You can use the Offers API to add discount codes to an existing offer. Create an offer Navigate to the [Offers](https://ui.attentivemobile.com/offers) page. Click **+ Create offer** in the top-right corner. On the **Choose an offer type** window, select **Unique discount codes** Enter a unique name for your offer in the **Discount name** field. Choose the **Distribution window**. **Note**: If you include start and end dates in your API call, the distribution window automatically updates to **Custom time period**. **Click Create.** Click back into the offer and retrieve the numeric ID at the end of the URL string. This is the ID you will need for the POST

Operations 1

POST /coupons/coupon-pool/{coupon-pool-id}/create Add discount codes #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/attentive-offers-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

attentive-offers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: For any questions, reach out to your Attentive point of contact (if applicable) or api@attentivemobile.com.
  title: Attentive Offers API
  version: ''
servers:
- url: https://api.attentivemobile.com/v1
  description: Attentive API
security:
- bearerAuth: []
tags:
- name: Offers
  description: You can use the Offers API to add discount codes to an existing offer.
  x-beta: true
paths:
  /coupons/coupon-pool/{coupon-pool-id}/create:
    post:
      tags:
      - Offers
      summary: Add discount codes
      description: 'Note: Once the offer(s) has been created, please reach out to an Attentive team member to enable this API feature for you


        Make a call to this asynchronous endpoint to create new discount codes in an existing offer.


        Validation rules


        Maximum of 200,000 discount codes per request.


        distributionStart must be before distributionStop, in UTC ISO format (e.g., 2023-02-14T21:29:25Z).


        Date ranges must not overlap with ranges from previous uploads to the same offer. Uploading to an existing range is allowed.


        All uploads in an offer must use the same distribution type. If previous uploads include expiration dates, new uploads must also include them, and vice versa.


        The offer (coupon pool) must exist and belong to your account.


        Sync behavior


        Check the status on the offer to monitor progress. If it still says SYNCING, the uploads may not be ready yet.'
      operationId: createCoupons
      x-external: true
      security:
      - OAuthFlow:
        - offers:write
      parameters:
      - in: path
        name: coupon-pool-id
        description: The ID created under "Create an Offer"
        required: true
        schema:
          type: integer
          format: int64
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCouponsDto'
        required: true
      responses:
        '202':
          description: Accepted. Check the Attentive [Offers](https://ui.attentivemobile.com/offers) page to make sure that there are no errors and the remaining code count is accurate.
        '400':
          $ref: '#/components/responses/InvalidParameter1'
        '403':
          $ref: '#/components/responses/AccessDenied1'
        '404':
          $ref: '#/components/responses/DetailedBadRequest'
        '500':
          $ref: '#/components/responses/InternalError1'
components:
  schemas:
    ErrorResponseDto:
      type: object
      required:
      - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDto'
    ErrorDto:
      type: object
      required:
      - id
      - message
      properties:
        id:
          type: integer
          format: int64
          description: Unique error id, mapping to service logs
        message:
          type: string
          description: API response error message
    CreateCouponsDto:
      type: object
      required:
      - codes
      properties:
        codes:
          type: array
          items:
            type: string
          description: List of the discount code values. Number of discount codes must be between 0 and 200,000.
          example:
          - code1
          - code2
          - code3
          - code4
          - code5
        distributionStart:
          type: string
          description: Timestamp at which point the discount codes become valid for distribution within Attentive messages. Must be in valid UTC ISO format e.g. 2023-03-04T21:29:25Z. If null, the discount codes never expire.
          example: '2023-02-14T21:29:25Z'
        distributionStop:
          type: string
          description: Timestamp at which point the discount codes become invalid for distribution within Attentive messages. Must be in valid UTC ISO format.
          example: '2023-02-15T21:29:25Z'
  responses:
    AccessDenied1:
      description: Access Denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseDto'
    DetailedBadRequest:
      description: "Bad Request. Invalid parameter in request query or body. The following scenarios will cause a 400 response: \nA) Including distributionStart and distributionStop dates that overlap with the distributionStart and distributionStop dates from a previous call, \nB) Including distributionStart and distributionStop dates in an offer that has a distribution window of “Never expire” or “Time to live”, \nC) Excluding distributionStart and distributionStop dates in an offer that has a distribution window of “Custom time period”, D) Including a distributionStart value that is after the distributionStop value\n"
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseDto'
    InternalError1:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseDto'
    InvalidParameter1:
      description: Invalid parameter in request query or body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseDto'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    OAuthFlow:
      type: oauth2
      description: This API uses OAuth 2 with the authorization code grant flow. [More info](https://docs.attentivemobile.com/pages/authentication/)
      flows:
        authorizationCode:
          authorizationUrl: https://ui-devel.attentivemobile.com/integrations/oauth-install?client_id={clientId}&redirect_uri={redirectUri}&scope={scope}
          tokenUrl: https://api.attentivemobile.com/v1/authorization-codes/tokens
          scopes:
            attributes:write: read and write custom attributes
            subscriptions:write: read and write subscriptions
            events:write: read and write custom events
            ecommerce:write: read and write ecommerce events
            segments:write: read and write segments
            segments:read: read segments
x-readme:
  explorer-enabled: false