Home AssignmentsFind freelance work InvoicingHow invoicing works PayoutsManage contractors SupportSupport and help
Country
Language
Create a free account

API/Authentication

Get started

Authentication

The EasyFreelance API uses an API key and a token to identify and authenticate requests. Both are generated in the Web Panel.

Contents

Authentication is done with a token-based HTTP Authentication scheme. For a request to be authorised, the token must be in Authorization-header, prefixed with the text Bearer and a space. In addition, send the partner's API key in the header API-key.

Note that you receive separate API keys and tokens for production and test environments. Keys from one environment do not work in the other.

Keep the keys secret

The API key and the token give access to several functions in the system, and must therefore be kept secure. Do not share them in publicly accessible places – such as GitHub, client-side code or other open systems. If you need to replace them, generate new ones in Web Panel.

Headers

HeaderValueDescription
AuthorizationBearer <token>requiredPersonal access token (Sanctum) from the API settings.
API-key<uuid>requiredThe partner's API key. Same place as the token.
Content-Typeapplication/jsonoptionalRequired when the request has a JSON body.
Acceptapplication/jsonoptionalRecommended, so that errors are returned as JSON and not as HTML.
Idempotency-key<uuid>optionalSee Idempotency. Recommended on POST /payouts.

Example

Replace <token> and <api-key> with your own values.

cURL
curl --location --request POST 'https://test.easyfreelance.no/api/v1/users' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer T8Cf2oWpDhPpYq2uE2JWRHaVdqsC3RJJTsdNSoGMhLxhE1Z3w7L9UVMW4T8owhIF' \
--header 'API-key: fd612e61-de98-4bb7-a636-cfc66bdd61ea' \
--header 'Idempotency-key: 6922d7be-c098-11ec-9d64-0242ac120004' \
--data '{"email":"[email protected]"}'

Missing or invalid authentication

If the headers are missing, or the token has expired or been revoked, the API responds with 401 Unauthorized with Laravel's standard format for API routes.

401 Unauthorized
{
  "message": "Unauthenticated."
}

Environments

Productionhttps://app.easyfreelance.no/api/v1
Test environmenthttps://test.easyfreelance.no/api/v1

Rate limiting

All authenticated traffic from the same API identity shares a single rolling limit of 500 requests per minute across all /api/v1-routes. If it is exceeded, the API responds 429 Too Many Requests, optionally with the header Retry-After.