---
updatedAt: 2026-07-13T07:05:39.000Z
agentTools:
  projectIndex: https://docs.getsmileapi.com/llms.txt
---

# Refresh Token

Refresh a token for a user

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Smile API",
    "version": "1.14.0",
    "description": "The Smile API provides employment and income data from a single API. ",
    "contact": {
      "name": "Smile Technology Pte Ltd",
      "url": "https://www.getsmileapi.com",
      "email": "info@getsmileapi.com"
    },
    "termsOfService": "https://www.getsmileapi.com/terms-and-conditions"
  },
  "servers": [
    {
      "url": "https://sandbox.smileapi.io/v1",
      "description": "Sandbox"
    },
    {
      "url": "https://open.smileapi.io/v1",
      "description": "Production"
    }
  ],
  "paths": {
    "/tokens": {
      "post": {
        "summary": "Refresh Token",
        "operationId": "create-token",
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenPostResponse"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": "OK",
                      "message": "Success",
                      "requestId": "5b79399a-6852-4234-bb0e-ad472648282d",
                      "data": {
                        "expiresAt": "2021-04-14T09:30:24Z",
                        "mode": "SANDBOX",
                        "accessToken": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Refresh a token for a user",
        "tags": [
          "Tokens"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "in": "query",
            "name": "userId",
            "required": true,
            "description": "the user whom to create token for."
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ObjectMetadataRefCode": {
        "type": "string",
        "title": "ObjectMetadataRefCode",
        "description": "Request status code",
        "enum": [
          "OK",
          "CREATED",
          "INVALID_CREDENTIALS",
          "INVALID_PARAMETERS",
          "INVALID_TOKEN",
          "UNAUTHORIZED_ACCESS",
          "MISSING_RESOURCE",
          "REQUEST_LIMIT_EXCEEDED",
          "SERVER_ERROR",
          "UNSUPPORTED_METHOD",
          "SERVER_UNAVAILABLE",
          "TIME_LIMIT_EXCEEDED"
        ],
        "example": "OK",
        "x-internal": false
      },
      "ObjectMetadataRefMessage": {
        "type": "string",
        "title": "ObjectMetadataRefMessage",
        "description": "Message response to the request",
        "example": "Success",
        "x-internal": false
      },
      "ObjectMetadataRefRequestID": {
        "type": "string",
        "title": "ObjectMetadataRefRequestID",
        "description": "Unique ID that is added to the body of every response for easy traceability of the request in our logs.",
        "x-internal": false,
        "example": "5b79399a-6852-4234-bb0e-ad472648282d"
      },
      "RefDateTime": {
        "type": "string",
        "title": "Date and Time string",
        "format": "date-time",
        "example": "2021-04-14T09:30:24Z",
        "description": "Date and time"
      },
      "Token": {
        "title": "Token",
        "type": "object",
        "x-tags": [
          "Tokens"
        ],
        "description": "A method for securely transmitting information between Smile and the user.",
        "x-examples": {
          "Example": {
            "id": "tk-ac86a0f7d46545f89adee8607a727573",
            "expiresAt": "2021-04-14T09:30:24Z",
            "mode": "SANDBOX",
            "accessToken": "string"
          }
        },
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the Token"
          },
          "expiresAt": {
            "$ref": "#/components/schemas/RefDateTime"
          },
          "mode": {
            "type": "string",
            "enum": [
              "SANDBOX",
              "PRODUCTION"
            ],
            "example": "SANDBOX",
            "description": "Valid Smile mode for the Token"
          },
          "accessToken": {
            "type": "string",
            "description": "Short-lived token to initiate link flow"
          }
        },
        "required": [
          "expiresAt",
          "mode",
          "accessToken"
        ]
      },
      "TokenPostResponse": {
        "title": "Token Post Response",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ObjectMetadataRefCode"
          },
          "message": {
            "$ref": "#/components/schemas/ObjectMetadataRefMessage"
          },
          "requestId": {
            "$ref": "#/components/schemas/ObjectMetadataRefRequestID"
          },
          "data": {
            "$ref": "#/components/schemas/Token"
          }
        },
        "x-examples": {}
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ]
}
```