SDK
Typescript client for MobilizeHub
If you prefer a typed experience over calling http endpoints directly, you can use our sdk @mobilizehub/api.
The SDK uses the same authentication and authorization as the API, so you can use it in the same way as you would use the API. The same HTTP RPC-style methods are available as the API, so you can use the SDK to create, update, delete and list resources.
MobilizeHub API Key
When creating, revoking or updating resources, you will need your api key — you can create a new one in the settings of your organization under API Keys
. Afterwards you need to provide it to the client:
Always keep your api key safe and reset it if you suspect it has been compromised.
Response format
Every method returns either an error or a result field, never both and never none. Errors are explicitly returned to be handled is typesafe.
Checking for errors
To check for errors you use the error property, our errors are easy to read and provide a link to our documentation for more information.
Retries
By default the client will retry on network errors, you can customize this behavior: