---
title: acceptRecord
framework: CKTool JS
role: symbol
role_heading: Instance Method
platforms: [cktool js 1.2.15+]
path: cktooljs/promisesapi/acceptrecord
---

# acceptRecord

Accepts a share on behalf of the current user.

## Declaration

```data
CancellablePromise acceptRecord(
	AcceptRecordParams params
);
```

## Parameters

- `params`: A dictionary as described in the Discussion section.

## Return Value

Return Value A CancellablePromise with the following resolutions.

## Discussion

Discussion If the promise is successful, it will resolve with one of the following dictionaries: { statusCode: 200; result: CKDBResolveRecordResponse } The promise may reject and throw the following: DocumentedResponseError, if the HTTP status code is 421. The result member will be a dictionary conforming to AuthenticationRequiredError. DocumentedResponseError, if the HTTP status code is none of the above and in the range 400 to 599. The result member will be a dictionary conforming to RequestError. ValidationError, if the parameters to the method are incorrect. A FetchError descendant, if there is a problem with the network request. A reference to the request object can be used to examine the underlying cause. Discussion The params dictionary has the following properties: dictionary AcceptRecordParams {   string containerId;   CKEnvironment environment;   string shortGuid;   CKDBResolveRecordRequestBody? body; } containerId: The container identifier. See Container. environment: The container environment. For valid values, see CKEnvironment. shortGuid: A global unique identifier for this record used for sharing. See createRecord for information on retrieving this identifier. body: Configuration options for how the resolved record is returned. If successful, the result contains a CKDBResolveRecordResponse object that contains the resolved record. The recipient must accept the shared record before adding it to their shared database. A shared record’s participants are listed in the participants field on CKDBRecord. You can update this array using the updateRecord operation.

## See Also

### Record Management

- [createRecord](cktooljs/promisesapi/createrecord.md)
- [deleteRecord](cktooljs/promisesapi/deleterecord.md)
- [deleteRecordsByQuery](cktooljs/promisesapi/deleterecordsbyquery.md)
- [getRecord](cktooljs/promisesapi/getrecord.md)
- [lookupRecords](cktooljs/promisesapi/lookuprecords.md)
- [queryRecordChanges](cktooljs/promisesapi/queryrecordchanges.md)
- [queryRecords](cktooljs/promisesapi/queryrecords.md)
- [resolveRecord](cktooljs/promisesapi/resolverecord.md)
- [updateRecord](cktooljs/promisesapi/updaterecord.md)
