Fiber
Docs
Search docs
Ctrl K
Accounts Spec
Managing accounts in your environment.

Create account

Registers a new third-party account with Fiber. You need to know the alias of the source you want to create it in. The following request will register an account in the source named SOURCE_NAME, and start syncing it through all the syncs that are connected to it.

You must pass the CREDENTIALS object as defined in the spec for the source.

curl -X POST https://api.fiber.dev/sources/SOURCE_NAME/accounts \
  -H "Content-Type: application/json" \
  -H "Authorization: Basic base64(CLIENT_ID:CLIENT_SECRET)" \
  -d '{
    "credentials": CREDENTIALS
  }'

Response

Success (status 200)

{
  "account": {
    "external_id": "EXTERNAL_ID",
  },
  // If the account already existed, this will be true.
  "already_existed": true,
}

Failure (status 400)

{}

Toggle account state

You can enable or disable an account by making the following request. This will update the account's state in their source, and start or stop syncing it through all the syncs that are connected to it.

 

We are rolling out this feature gradually. Please reach out to our team to get access to this.

Delete account

curl https://api.fiber.dev/sources/SOURCE_NAME/accounts/EXTERNAL_ID \
  -X DELETE \
  -H "Content-Type: application/json" \
  -H "Authorization: Basic base64(CLIENT_ID:CLIENT_SECRET)"

This request may take several seconds to complete.

Copyright © 2024 Fiber