Skip to content

API Keys

Manage API keys for accessing the Uniwire API. Note that create, edit, and delete operations for API keys, as well as access to api_secret and callback_token fields, are only available using special "Integrator API" keys upon request.

List API Keys

Retrieve all API keys associated with your account. Fields api_secret and callback_token are only fully accessible when using special "Integrator API" keys. Using regular API keys will display these fields as ******** for security.

HTTP Request

GET /v1/api-keys/

python
response = uniwire_api_request('/v1/api-keys/')
javascript
uniwire_api_request('/v1/api-keys/').then(function(response) {
  console.log(response);
}).catch(function(error) {
  console.log(error);
});

The above command returns JSON structured like this:

json
{
  "result": [
    {
      "id": "<ID>",
      "api_key": "<API_KEY>",
      "api_secret": "<SECRET>",
      "name": "KEY 1700572804",
      "created_by": "user@example.com",
      "updated_at": "2023-11-21T13:46:50.843596+00:00",
      "is_integrator_key": true,
      "account_id": "<ACCOUNT_ID>",
      "max_payout": "55.00",
      "whitelist_ip": [
        "127.0.0.1",
        "123.123.123.123"
      ],
      "permissions": [
        "invoices:write",
        "transactions:write",
        "payouts:write",
        "auto-payouts:write",
        "profiles:write",
        "wallets:write",
        "exchange-rates:write",
        "auto-conversions:write",
        "auto-funding:write",
        "conversions:write",
        "account:write",
        "api-keys:write"
      ]
    }
  ]
}

Get API Key

This endpoint retrieves a specific api-key.

Field api_secret are only fully accessible when using special "Integrator API" keys, which are available upon request.

Using any API key other than the special 'Integrator API' key results in the values of the api_secret fields being displayed as ********.

This measure is implemented to maintain security and confidentiality, ensuring sensitive information is only fully accessible through the designated Integrator API key.

HTTP Request

GET /v1/api-keys/<ID>/

URL Parameters

ParameterDescription
IDThe ID of the api-key to retrieve
python
response = uniwire_api_request('/v1/api-keys/<id>/')
javascript
uniwire_api_request('/v1/api-keys/<id>/').then(function(response) {
  console.log(response);
}).catch(function(error) {
  console.log(error);
});

The above command returns JSON structured like this:

json
{
  "result": {
    "id": "<ID>",
    "api_key": "<API_KEY>",
    "api_secret": "<SECRET>",
    "name": "Production Api Key",
    "created_by": "user@example.com",
    "updated_at": "2023-11-21T13:46:50.843596+00:00",
    "is_integrator_key": true,
    "account_id": "<ACCOUNT_ID>",
    "max_payout": "55.00",
    "whitelist_ip": [
      "127.0.0.1",
      "123.123.123.123"
    ],
    "permissions": [
      "invoices:write",
      "transactions:write",
      "payouts:write",
      "auto-payouts:write",
      "profiles:write",
      "wallets:write",
      "exchange-rates:write",
      "auto-conversions:write",
      "auto-funding:write",
      "conversions:write",
      "account:write",
      "api-keys:write"
    ]
  }
}

Create API Key

This endpoint allows creating api-key. This is only accessible using special "Integrator API" keys and are available upon request.

HTTP Request

POST /v1/api-keys/

Payload Parameters

ParameterDescriptionRequired
nameText field maximum length 64Yes
account_idSub Account IDYes
max_payoutDecimal numberNo
whitelist_ipArray of stringsNo
permissionsArray of strings Available ValuesYes
python
import json

payload = {
    'name': 'Production Api Key',
    'max_payout': "55",
    "account_id": "8dd75ab0-9f11-4c7f-9bd2-77eb2fb84963",
    'whitelist_ip': [
        "127.0.0.1",
        "123.123.123.123"
    ],
    "permissions": [
        "invoices:read",
        "transactions:read",
        "payouts:read",
        "auto-payouts:read",
        "profiles:read",
        "wallets:read",
        "exchange-rates:read",
        "auto-conversions:read",
        "auto-funding:read",
        "conversions:read",
        "account:read",
        "api-keys:read"
    ]
}
response = uniwire_api_request('/v1/api-keys/', payload, 'POST')
print(json.dumps(response, indent=2))
javascript
let payload = {
  'name': 'Production Api Key',
  'max_payout': "55",
  "account_id": "8dd75ab0-9f11-4c7f-9bd2-77eb2fb84963",
  'whitelist_ip': [
    "127.0.0.1",
    "123.123.123.123"
  ],
  "permissions": [
    "invoices:read",
    "transactions:read",
    "payouts:read",
    "auto-payouts:read",
    "profiles:read",
    "wallets:read",
    "exchange-rates:read",
    "auto-conversions:read",
    "auto-funding:read",
    "conversions:read",
    "account:read",
    "api-keys:read"
  ]
}
uniwire_api_request('/v1/api-keys/', payload, 'POST').then(function(response) {
  console.log(response)
}).catch(function(error) {
  console.log(error)
})

JSON response for Create api-key endpoint:

json
{
  "result": {
    "id": "<ID>",
    "api_key": "<API_KEY>",
    "api_secret": "<SECRET>",
    "name": "Production Api Key",
    "created_by": "user@example.com",
    "updated_at": "2023-11-21T13:46:50.843596+00:00",
    "is_integrator_key": true,
    "account_id": "<ACCOUNT_ID>",
    "max_payout": "55.00",
    "whitelist_ip": [
      "127.0.0.1",
      "123.123.123.123"
    ],
    "permissions": [
      "invoices:write",
      "transactions:write",
      "payouts:write",
      "auto-payouts:write",
      "profiles:write",
      "wallets:write",
      "exchange-rates:write",
      "auto-conversions:write",
      "auto-funding:write",
      "conversions:write",
      "account:write",
      "api-keys:write"
    ]
  }
}

Update API Key

This endpoint allows updating api-key. This is only accessible using special "Integrator API" keys and are available upon request.

Editable fields: name,max_payout,whitelist_ip,permissions.

HTTP Request

PUT https://api.uniwire.com/v1/api-keys/<ID>/

URL Parameters

ParameterDescription
IDThe ID of the api-key to retrieve

Payload Parameters

ParameterDescription
nameText field maximum length 64
account_idSub Account ID
max_payoutDecimal number
whitelist_ipArray of strings
permissionsArray of strings Available Values
python
import json

payload = {
    'name': 'Production Api Key',
    'max_payout': "55",
    "account_id": "8dd75ab0-9f11-4c7f-9bd2-77eb2fb84963",
    'whitelist_ip': [
        "127.0.0.1",
        "123.123.123.123"
    ],
    "permissions": [
        "invoices:read",
        "transactions:read",
        "payouts:read",
        "auto-payouts:read",
        "profiles:read",
        "wallets:read",
        "exchange-rates:read",
        "auto-conversions:read",
        "auto-funding:read",
        "conversions:read",
        "account:read",
        "api-keys:read"
    ]
}

response = uniwire_api_request('/v1/api-keys/<id>', payload, 'PUT')
print(json.dumps(response, indent=2))
javascript
let payload = {
  'name': 'Production Api Key',
  'max_payout': "55",
  "account_id": "8dd75ab0-9f11-4c7f-9bd2-77eb2fb84963",
  'whitelist_ip': [
    "127.0.0.1",
    "123.123.123.123"
  ],
  "permissions": [
    "invoices:read",
    "transactions:read",
    "payouts:read",
    "auto-payouts:read",
    "profiles:read",
    "wallets:read",
    "exchange-rates:read",
    "auto-conversions:read",
    "auto-funding:read",
    "conversions:read",
    "account:read",
    "api-keys:read"
  ]
}
uniwire_api_request('/v1/api-keys/<id>', payload, 'PUT').then(function(response) {
  console.log(response)
}).catch(function(error) {
  console.log(error)
})

JSON response for Create api-key endpoint:

json
{
  "result": {
    "id": "<ID>",
    "api_key": "<API_KEY>",
    "api_secret": "<SECRET>",
    "name": "Production Api Key",
    "created_by": "user@example.com",
    "updated_at": "2023-11-21T13:46:50.843596+00:00",
    "is_integrator_key": true,
    "account_id": "<ACCOUNT_ID>",
    "max_payout": "55.00",
    "whitelist_ip": [
      "127.0.0.1",
      "123.123.123.123"
    ],
    "permissions": [
      "invoices:write",
      "transactions:write",
      "payouts:write",
      "auto-payouts:write",
      "profiles:write",
      "wallets:write",
      "exchange-rates:write",
      "auto-conversions:write",
      "auto-funding:write",
      "conversions:write",
      "account:write",
      "api-keys:write"
    ]
  }
}

Delete API Key

This endpoint allows deleting api-key. This is only accessible using special "Integrator API" keys and are available upon request.

HTTP Request

DELETE https://api.uniwire.com/v1/api-keys/<ID>/

URL Parameters

ParameterDescription
IDThe ID of the api-key to delete
python
import json

payload = None
response = uniwire_api_request('/v1/api-keys/<id>', payload, 'DELETE')
print(json.dumps(response, indent=2))
javascript
var payload = null
uniwire_api_request('/v1/api-keys/<id>', payload, 'DELETE').then(function(response) {
  //
}).catch(function(error) {
  console.log(error);
});

API Key Permissions

Following are the supported list of API Key permissions:

PermissionDescription
invoices:readRead access to invoices
invoices:writeWrite access to invoices
transactions:readRead access to transactions
transactions:writeWrite access to transactions
payouts:readRead access to payouts
payouts:writeWrite access to payouts
payouts:approveApprove payouts
auto-payouts:readRead access to auto-payouts
auto-payouts:writeWrite access to auto-payouts
profiles:readRead access to profiles
profiles:writeWrite access to profiles
wallets:readRead access to wallets
wallets:writeWrite access to wallets
exchange-rates:readRead access to exchange rates
exchange-rates:writeWrite access to exchange rates
auto-conversions:readRead access to auto-conversions
auto-conversions:writeWrite access to auto-conversions
auto-funding:readRead access to auto-funding
auto-funding:writeWrite access to auto-funding
conversions:readRead access to conversions
conversions:writeWrite access to conversions
account:readRead access to account
account:writeWrite access to account
api-keys:readRead access to API keys