# Providers API

A Provider is a verified website where your Courses are hosted.

To add new websites to your account, please visit the Classpert Dashboard (opens new window)

The Provider API allows users to verify data about the Providers they have ownership. At the moment it's only possible to use the API for viewing Providers; adding new Providers must be done via Developers Dashboard.

# GET

Use GET to view the all providers owned by the user.

curl 'https://api.classpert.com/developer/v1/providers' \
   -H 'X-Api-Key:  2DG13IFKQQWDhxE5qc0rgw.SH6VJJelRIWSENihKwAKIwVQGVHNLvSW-_Ii2x6-75KgO70MIJyXSBGnXr1Qt8iESgcFdzlZxjT4m0dgE4BPtAdA'

# Examples

Example of a successful request:

curl 'https://api.classpert.com/developer/v1/providers' \
   -H 'X-Api-Key:  2DG13IFKQQWDhxE5qc0rgw.SH6VJJelRIWSENihKwAKIwVQGVHNLvSW-_Ii2x6-75KgO70MIJyXSBGnXr1Qt8iESgcFdzlZxjT4m0dgE4BPtAdA'

[
  {
    "id": "73c8a601-13d6-4640-a880-e19e13a2ae76",
    "name": "My Provider",
    "description": "My provider's description",
    "slug": "my-provider",
    "url": "https://my-provider.com",
    "domain": null,
    "published": true
  }
]

All requests require a correct API Key, and failing to provide a valid API Key will return Error 401

curl 'https://api.classpert.com/developer/v1/providers' \
   -H 'X-Api-Key:  some_invalid_key'

HTTP/2 401
{"hint":"Invalid API Key","details":"Check if your API Key is correct or generate a new one"}

If the API is called without passing any API Key header at all, it will also return Error 401.

$ curl -i 'https://api.classpert.com/developer/v1/providers'

HTTP/2 401
{"hint":"No API Key provided","details":"Missing API Key value in the X-API-Key header"}