Login

This section takes you through using Postman to test the Violet APIs. Make sure you have already signed up at channel.violet.io/signup and created an application in the step prior. If you haven't, please go through Create a Violet Application

The Violet Postman Collection is available here:Violet Postman Collection

If you would like to fork the collection into your Postman workspace, you can do so here:Fork Violet Postman Collection

You will need your App ID and App Secret in order to complete this step.

Initial Postman Setup

The Violet Postman Collection uses Collection Variables to store your App Id and App Secret and pass them in to all requests across the collection. Follow this guide to find where to set these values in our Collection.

You can ignore the other values in the variable list, these are used by the scripts and populated automatically based on the result of the previous request. (If you are curious how that works, check out the test tab on some of the requests, they will have a green dot if there is info there.)

Login

This API tests your connection to Violet by logging into your Application. Add X-Violet-App-Id and X-Violet-App-Secret added to your headers for login. These are available from the application you created on channel.violet.io. Every request after login will require these header params for authentication, along with the X-Violet-Token that you get from login and refreshing your token.

While your username and password will be the same across environments (test and live) as will your X-Violet-App-Id, this is not true for your X-Violet-App-Secret.

The X-Violet-App-Secret you retrieve from the Channel dashboard is different depending on the live/test mode toggle. You must use the correct app secret that corresponds to the environment you are trying to login to: test for sandbox-api.violet.io and live for api.violet.io.

In addition to the headers mentioned above, include your username (your username is the email you signed up with) and password. If successful, an access token will be returned in the response body for use in additional requests against the API along with information about your API.

If you are using our Postman collection, you can add X-Violet-App-Id and X-Violet-App-Secret in the environment variables.

Login

post
Header parameters
X-Violet-App-SecretstringRequired

Please note that App Secrets are different depending on environment (test/live) please make sure you have retrieved the correct app secret from the Dashboard.

X-Violet-App-Idinteger · int32Required
Body

Login Request

usernamestringRequired

Username

passwordstringRequired

Password

Responses
default
default response
application/json
post
POST /v1/login HTTP/1.1
Host: sandbox-api.violet.io
X-Violet-App-Secret: text
X-Violet-App-Id: 1
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "username": "text",
  "password": "text"
}
default

default response

{
  "id": 1,
  "first_name": "text",
  "last_name": "text",
  "password": "text",
  "email": "text",
  "type": "SUPER_ADMIN",
  "verified": true,
  "status": "inactive",
  "date_created": "2025-07-12T03:18:23.739Z",
  "date_last_modified": "2025-07-12T03:18:23.739Z",
  "roles": [
    {
      "name": "text",
      "permissions": [
        {
          "name": "text",
          "description": "text"
        }
      ]
    }
  ],
  "tos_accepted": true,
  "payment_configured": true,
  "privacy_policy_accepted": true,
  "country_code": "US",
  "token": "text",
  "refresh_token": "text",
  "merchant_id": 1,
  "merchant_ids": [
    1
  ],
  "store_url": "text"
}

Refresh your Token

Use the Refresh Token to get a new token. This is an operation you will have to do on a regular basis. You can use your App Id and App Secret with a refresh token to get a new token. This saves the step of having to send your username and password each time to get a new token.

Last updated

Was this helpful?