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

# Reset promoter's authentication token

> Resetting the authentication token (`auth_token`), which is used to automatically sign in your promoters (if you use this feature), is not required but can enhance the security of the promoter dashboard. You can set up a cron job to call the API endpoint and store the new auth_token from the response. <br/><br/>You can identify promoters by id, cust_id, or auth_token; only one is required.<Tip> **HTTP Request** <br/> `PUT https://firstpromoter.com/api/v1/promoters/refresh_token` </Tip>

Resetting authentication token(auth\_token) which is used to automatically sign in your promoters(if you use this feature) is not required, but can be used to enhance the security of the promoter dashboard. You can set up a cron job to call the API endpoint and store the new "auth\_token" from the response.

You can identify promoters by: id, cust\_id or auth\_token...only one required.


## OpenAPI

````yaml openapi-promoters PUT /refresh_token
openapi: 3.0.1
info:
  title: FirstPromoter Promoters API
  description: >-
    The Promoters API endpoint allows you to manage your affiliates/promoters
    through API calls. The most important use case is to automatically create
    promoter accounts for your customers.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://firstpromoter.com/api/v1/promoters
security:
  - apiKeyAuth: []
paths:
  /refresh_token:
    put:
      description: >-
        Resetting the authentication token (`auth_token`), which is used to
        automatically sign in your promoters (if you use this feature), is not
        required but can enhance the security of the promoter dashboard. You can
        set up a cron job to call the API endpoint and store the new auth_token
        from the response. <br/><br/>You can identify promoters by id, cust_id,
        or auth_token; only one is required.<Tip> **HTTP Request** <br/> `PUT
        https://firstpromoter.com/api/v1/promoters/refresh_token` </Tip>
      parameters:
        - name: id
          in: query
          description: Promoter's ID inside FirstPromoter
          schema:
            type: string
        - name: promoter_email
          in: query
          description: Email of the promoter
          schema:
            type: string
        - name: cust_id
          in: query
          description: Assigned customer/user ID
          schema:
            type: string
        - name: ref_id
          in: query
          description: Referral ID'
          schema:
            type: string
        - name: auth_token
          in: query
          description: Authentication token generated when the promoter was created
          schema:
            type: string
      responses:
        '200':
          description: Refresh Token response
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth_token:
                    type: string
                    example: 4ktxi8sUeevM6BkNR1XXt2G5EAqCzhSu
        '401':
          description: Authentication Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationError'
                example: Bad credentials
        '404':
          description: Not Found Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityErrorType1'
                example:
                  error: Promoter not found.
        '422':
          description: Unprocessable Entity Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityErrorType1'
                example:
                  error: >-
                    You need to find the promoter either by id, cust_id,
                    auth_token, ref_id or promoter_email
components:
  schemas:
    AuthenticationError:
      type: string
    UnprocessableEntityErrorType1:
      required:
        - error
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````