Campaigns
15 routes. Paths are relative to https://api.intersink.com/v1.
- GET/campaignsFetch all campaigns (with optional search/filters)
- POST/campaignsCreate a new campaign
- GET/campaigns/{id}Get a specific campaign by ID
- PATCH/campaigns/{id}Update an existing campaign
- DELETE/campaigns/{id}Delete a campaign
- POST/campaigns/{id}/publishPublish a draft campaign (re-runs moderation; approved -> published)
- GET/campaigns/{id}/updatesGet all updates for a campaign
- POST/campaigns/{id}/updatesCreate a new update for a campaign
- GET/campaigns/category/{categoryId}Fetch campaigns by a specific category ID
- GET/campaigns/myFetch all campaigns created by me
- GET/campaigns/searchSearch campaigns by text, category, and pagination
- GET/campaigns/statusesFetch all available campaign statuses
- GET/campaigns/trendingGet trending campaigns feed based on total donations
- PATCH/campaigns/updates/{updateId}Edit an existing campaign update
- DELETE/campaigns/updates/{updateId}Delete a campaign update
Fetch all campaigns (with optional search/filters)
GET/campaigns
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| q | string, query | Global text search query |
| category | string, query | Filter by category ID |
| status | string, query | Filter by status (e.g. published) |
| sort | string, query | Sorting string (e.g. -date_created) |
| limit | string, query | Maximum number of items to return |
| offset | string, query | Number of items to skip for pagination |
| active_profile_id | string, query | Active profile ID to fetch contextual data (likes, follow status) |
| user_profile_id | string, query | Filter by author profile id |
| page | string, query | Page number |
| x-ref | string, header |
Response
200. The payload in data is not described in the spec yet.
Create a new campaign
POST/campaigns
Needs a signed-in user (Bearer token or access_token cookie).
Request body multipart/form-data
| Field | Type | Description |
|---|---|---|
| titlerequired | string | |
| descriptionrequired | string | |
| demand | string | |
| category | string | |
| category_id | string | |
| post_id | string | |
| status | string | |
| verified | string | |
| active_profile_id | string | |
| institution_id | string | |
| location | string | Coordinates as "latitude,longitude". Stored as a PostGIS point; place names are not geocoded. Example: "28.6139,77.2090" |
Response
201. The payload in data is not described in the spec yet.
Get a specific campaign by ID
GET/campaigns/{id}
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path | |
| x-ref | string, header |
Response
200. The payload in data is not described in the spec yet.
Update an existing campaign
PATCH/campaigns/{id}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path |
Request body multipart/form-data
| Field | Type | Description |
|---|---|---|
| title | string | |
| description | string | |
| demand | string | |
| category | string | |
| category_id | string | |
| post_id | string | |
| status | string | |
| verified | string | |
| institution_id | string | |
| location | string | Coordinates as "latitude,longitude". Stored as a PostGIS point; place names are not geocoded. Send an empty string to clear it. Example: "28.6139,77.2090" |
| media | object | Existing image ids to keep on update, e.g. [490,491]. Images not listed are removed. |
| keep_images | object | Alias of media: existing image ids to keep on update. |
Response
200. The payload in data is not described in the spec yet.
Delete a campaign
DELETE/campaigns/{id}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Publish a draft campaign (re-runs moderation; approved -> published)
POST/campaigns/{id}/publish
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path |
Response
201. The payload in data is not described in the spec yet.
Get all updates for a campaign
GET/campaigns/{id}/updates
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path | |
| x-ref | string, header | |
| limitrequired | string, query | |
| offsetrequired | string, query |
Response
200. The payload in data is not described in the spec yet.
Create a new update for a campaign
POST/campaigns/{id}/updates
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| titlerequired | string | At most 255 characters. |
| description | string | |
| file | string | |
| status | number | Minimum 1. |
Response
201. The payload in data is not described in the spec yet.
Fetch campaigns by a specific category ID
GET/campaigns/category/{categoryId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| categoryIdrequired | string, path | |
| x-ref | string, header |
Response
200. The payload in data is not described in the spec yet.
Fetch all campaigns created by me
GET/campaigns/my
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| active_profile_idrequired | string, query | |
| limitrequired | string, query | |
| offsetrequired | string, query |
Response
200. The payload in data is not described in the spec yet.
Search campaigns by text, category, and pagination
GET/campaigns/search
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| x-ref | string, header | |
| active_profile_idrequired | string, query |
Response
200. The payload in data is not described in the spec yet.
Fetch all available campaign statuses
GET/campaigns/statuses
Public: no sign-in needed.
Response
200. The payload in data is not described in the spec yet.
Get trending campaigns feed based on total donations
GET/campaigns/trending
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| x-ref | string, header | |
| active_profile_idrequired | string, query |
Response
200. The payload in data is of type object.
Edit an existing campaign update
PATCH/campaigns/updates/{updateId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| updateIdrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| title | string | At most 255 characters. |
| description | string | |
| file | string | |
| status | number | Minimum 1. |
Response
200. The payload in data is not described in the spec yet.
Delete a campaign update
DELETE/campaigns/updates/{updateId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| updateIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.