# Create profile POST https://hublinks.io/rest/accounts/{account_id}/campaigns/{campaign_id}/profiles Content-Type: application/json Create a campaign profile. If `id` is missing, it is generated with prefix `id_`. **Request body fields (wrapped in `profile` object for CREATE; flat for UPDATE):** - `campaign_id` (string, required for create) - Parent campaign ID. - `seat_id` (string, required for create) - Seat performing outreach. - `member_id` (string, required) - Linkedin member ID. - `status` (string, optional) - `RUN` | `DONE` | `PAUSED`. - `first_name` / `last_name` (string, optional) - Profile name override. Reference: https://api.hublinks.io/api-reference/campaign-profiles/create-profile ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: collection version: 1.0.0 paths: /rest/accounts/{account_id}/campaigns/{campaign_id}/profiles: post: operationId: create-profile summary: Create profile description: >- Create a campaign profile. If `id` is missing, it is generated with prefix `id_`. **Request body fields (wrapped in `profile` object for CREATE; flat for UPDATE):** - `campaign_id` (string, required for create) - Parent campaign ID. - `seat_id` (string, required for create) - Seat performing outreach. - `member_id` (string, required) - Linkedin member ID. - `status` (string, optional) - `RUN` | `DONE` | `PAUSED`. - `first_name` / `last_name` (string, optional) - Profile name override. tags: - subpackage_campaignProfiles parameters: - name: account_id in: path required: true schema: type: string - name: campaign_id in: path required: true schema: type: string - name: X-API-KEY in: header required: true schema: type: string responses: '200': description: Response with status 200 content: application/json: schema: $ref: >- #/components/schemas/Campaign Profiles_Create profile_Response_200 '400': description: Bad Request content: application/json: schema: $ref: >- #/components/schemas/PostRestAccountsAccount_cd855c2bb1cc72097238CampaignsCampaign_test_123ProfilesRequestBadRequestError '401': description: Unauthorized content: application/json: schema: $ref: >- #/components/schemas/PostRestAccountsAccount_cd855c2bb1cc72097238CampaignsCampaign_test_123ProfilesRequestUnauthorizedError requestBody: content: application/json: schema: type: object properties: profile: $ref: >- #/components/schemas/RestAccountsAccountIdCampaignsCampaignIdProfilesPostRequestBodyContentApplicationJsonSchemaProfile required: - profile servers: - url: https://hublinks.io components: schemas: RestAccountsAccountIdCampaignsCampaignIdProfilesPostRequestBodyContentApplicationJsonSchemaProfile: type: object properties: status: type: string seat_id: type: string member_id: type: string campaign_id: type: string required: - status - seat_id - member_id - campaign_id title: >- RestAccountsAccountIdCampaignsCampaignIdProfilesPostRequestBodyContentApplicationJsonSchemaProfile RestAccountsAccountIdCampaignsCampaignIdProfilesPostResponsesContentApplicationJsonSchemaProfile: type: object properties: status: type: string seat_id: type: string last_name: type: string member_id: type: string account_id: type: string first_name: type: string campaign_id: type: string required: - status - seat_id - last_name - member_id - account_id - first_name - campaign_id title: >- RestAccountsAccountIdCampaignsCampaignIdProfilesPostResponsesContentApplicationJsonSchemaProfile Campaign Profiles_Create profile_Response_200: type: object properties: success: type: boolean profile: $ref: >- #/components/schemas/RestAccountsAccountIdCampaignsCampaignIdProfilesPostResponsesContentApplicationJsonSchemaProfile required: - success - profile title: Campaign Profiles_Create profile_Response_200 PostRestAccountsAccount_cd855c2bb1cc72097238CampaignsCampaign_test_123ProfilesRequestBadRequestError: type: object properties: error: type: string message: type: string required: - error - message title: >- PostRestAccountsAccount_cd855c2bb1cc72097238CampaignsCampaign_test_123ProfilesRequestBadRequestError PostRestAccountsAccount_cd855c2bb1cc72097238CampaignsCampaign_test_123ProfilesRequestUnauthorizedError: type: object properties: error: type: string message: type: string required: - error - message title: >- PostRestAccountsAccount_cd855c2bb1cc72097238CampaignsCampaign_test_123ProfilesRequestUnauthorizedError securitySchemes: apiKeyAuth: type: apiKey in: header name: X-API-KEY ``` ## SDK Code Examples ```python Campaign Profiles_Create profile_example import requests url = "https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles" payload = { "profile": { "status": "ACTIVE", "seat_id": "{{seat_id}}", "member_id": "linkedin_member_123", "campaign_id": "{{campaign_id}}" } } headers = { "X-API-KEY": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Campaign Profiles_Create profile_example const url = 'https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles'; const options = { method: 'POST', headers: {'X-API-KEY': '', 'Content-Type': 'application/json'}, body: '{"profile":{"status":"ACTIVE","seat_id":"{{seat_id}}","member_id":"linkedin_member_123","campaign_id":"{{campaign_id}}"}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Campaign Profiles_Create profile_example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles" payload := strings.NewReader("{\n \"profile\": {\n \"status\": \"ACTIVE\",\n \"seat_id\": \"{{seat_id}}\",\n \"member_id\": \"linkedin_member_123\",\n \"campaign_id\": \"{{campaign_id}}\"\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("X-API-KEY", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Campaign Profiles_Create profile_example require 'uri' require 'net/http' url = URI("https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["X-API-KEY"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"profile\": {\n \"status\": \"ACTIVE\",\n \"seat_id\": \"{{seat_id}}\",\n \"member_id\": \"linkedin_member_123\",\n \"campaign_id\": \"{{campaign_id}}\"\n }\n}" response = http.request(request) puts response.read_body ``` ```java Campaign Profiles_Create profile_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles") .header("X-API-KEY", "") .header("Content-Type", "application/json") .body("{\n \"profile\": {\n \"status\": \"ACTIVE\",\n \"seat_id\": \"{{seat_id}}\",\n \"member_id\": \"linkedin_member_123\",\n \"campaign_id\": \"{{campaign_id}}\"\n }\n}") .asString(); ``` ```php Campaign Profiles_Create profile_example request('POST', 'https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles', [ 'body' => '{ "profile": { "status": "ACTIVE", "seat_id": "{{seat_id}}", "member_id": "linkedin_member_123", "campaign_id": "{{campaign_id}}" } }', 'headers' => [ 'Content-Type' => 'application/json', 'X-API-KEY' => '', ], ]); echo $response->getBody(); ``` ```csharp Campaign Profiles_Create profile_example using RestSharp; var client = new RestClient("https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles"); var request = new RestRequest(Method.POST); request.AddHeader("X-API-KEY", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"profile\": {\n \"status\": \"ACTIVE\",\n \"seat_id\": \"{{seat_id}}\",\n \"member_id\": \"linkedin_member_123\",\n \"campaign_id\": \"{{campaign_id}}\"\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Campaign Profiles_Create profile_example import Foundation let headers = [ "X-API-KEY": "", "Content-Type": "application/json" ] let parameters = ["profile": [ "status": "ACTIVE", "seat_id": "{{seat_id}}", "member_id": "linkedin_member_123", "campaign_id": "{{campaign_id}}" ]] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```