Vekta API

Overview

Read and manage your training data and your athletes' data.

With the Vekta API, you can read and manage your own data and the data of the athletes you coach: activities and their comments, training collections, training prescriptions (sent to connected devices), notes, events, metrics, sleep, wellness answers and workspace invitations.

To prescribe workouts with steps and targets, see Workout structure.

Authentication

Every request needs an API key, sent as a bearer token:

curl https://api.joinvekta.com/users/me \
  -H "Authorization: Bearer vk_..."

Access to a user's data

Most endpoints take a userId in the path: the id of a user from GET /users, or me for yourself.

You can only access a user's data while they have an active Vekta subscription:

  • For your own data (me), you need to be subscribed.
  • For an athlete's data, the athlete needs to be subscribed (your own subscription doesn't matter), and you need to be a coach or admin in a workspace where they're an athlete.

There are two kinds of errors:

  • If you have no link to a user or resource, you get a 404 with the not_found code, as if it didn't exist.

    { "code": "not_found", "error": "User not found." }
  • If you do have a link (it's you, one of your athletes, or something you can see) but you're not allowed to do this, you get a 403 with the reason as the code: subscription_required if the user isn't subscribed, forbidden if only someone else can do it (for example the creator, or the coaches of the workspace it was created in).

    { "code": "subscription_required", "error": "This athlete has no active Vekta subscription." }

If a path parameter, query parameter or payload is invalid, you get a 400 with the bad_request code and an explanation. Payloads and query parameters only accept the documented fields: an unknown one, such as a typo in a name, is an error too.

Rate limits

  • 300 requests per minute per API key, across all endpoints.
  • 30 requests per minute for each user you query (the userId in the path). Each user has their own limit, so fetching several users in parallel is fine.
  • Requests without a userId in the path (activity streams, workspace invitations...) only count toward the per API key limit.

Over the limit, you get a 429. The Retry-After header tells you how many seconds to wait:

HTTP/1.1 429 Too Many Requests
Retry-After: 42

Reference

The reference pages are generated from the API's OpenAPI specification. Browse them from the sidebar, or download the specification from https://api.joinvekta.com/openapi.json.

On this page