The Orgzit Web API is an interface for querying information from and enacting change in an Orgzit workspace. You can use the API not only to create records but also to fetch and update records in Orgzit.
Creating records through API is a three-step process:
- Accessing the API Key
- Making a Record Create Request
- Making the Requests to Create the Record
1. Accessing the API Key
To access your API Key, log into your Orgzit account, and go to your User Profile page.
You will find your API Key in the System Information Section there. Copy your entire API Key.
2. Making a Record Create Request
Once you retrieve the API key from your account, you can start making requests with the API.
- You will need to pass the key to the API in the header of your requests. Paste the key you copied in the Authorization Header.
- Set the Request Method to POST.
- The Request URL has the following format:
where the account_name is the name of your Orgzit account.
You can also get the Request URL from the Network Tab in the Browser's Developer Tools(in the Headers section).
- Set the Request Payload in the JSON format.
g3hj9lxfu9 is the data form ID. You can find the data form ID in the URL just before your dataform/table name.
Here, 03-interactions is the dataform/table, and
fmey0g37cu is the dataform ID.
Within fields, you can pass the field names and their respective values with which you want the record to be created.
Within dbvalues, you can pass values for Relationship fields. For relationship fields, you have to pass the record id of the record with which you want to link your created record.
For eg. To find the record ID for my relationship field, you can view the related record and copy its permalink.
Within the permalink
https://smalaviya96.orgzit.com/app/#r/jwq0dxoi4i/fmey0g37cu/03-interactions/gloria-e-bowen, the ID right after
/#r/ is the record ID, and that will act as your dbvalue.
In this examply, the dbvalue is
3. Making the Requests to Create the Record
Once you set all values for the new record that you are about to create, send your API request.
You can now check your workspace dataform/table, you will find that your record has been created with the values passed by you.